Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "GetTempFileName" in [All]

Constants

.

This is the maximum number of characters, usually including a null terminator, of a standard fully-pathed filename for most Windows API functions that operate on filenames (and a few .NET ones, such as Assembly.LoadFrom). Those that fill a buffer with a filename, such as GetTempFileName, expect a buffer of exactly this length. Some functions, such as CreateFile, can be made to accept longer filenames by using the "\\?\" syntax.

kernel32

.
Summary
.

static extern uint GetTempFileName(string lpPathName, string lpPrefixString,

.

/// The GetTempFileName and GetTempFolderName methods (and overloads) provide

.

/// the same level of convenience as the managed Path.GetTempFileName (including

.

  static extern uint GetTempFileName(string lpPathName, string lpPrefixString, uint uUnique, [Out] StringBuilder lpTempFileName);

.

  public static string GetTempFileName() {

.

    return GetTempFileName("tmp");

.

  public static string GetTempFileName(string prefix) {

.

    return GetTempFileName(prefix, 0);

.

  public static string GetTempFileName(string prefix, uint unique) {

.

    return GetTempFileName(prefix, unique, Path.GetTempPath());

.

  public static string GetTempFileName(string prefix, uint unique, string basePath) {

.

    // 'sb' needs >0 size else GetTempFileName throws IndexOutOfRangeException.  260 is the most you'd want.

.

    uint result = GetTempFileName(basePath, prefix, unique, sb);

.

    string tempFolderName = GetTempFileName(prefix, unique, basePath);

.

string tempFile = Win32Utility.GetTempFileName();

.

Public Shared Function GetTempFileName() As String

.

public static string GetTempFileName();

.

public: static String* GetTempFileName();

.

public static function GetTempFileName() : String;

.
Documentation
[GetTempFileName] on MSDN
.

         lngRet = GetTempFileName(astrFoldername, astrPrefix, 0, tempName)


 
Access PInvoke.net directly from VS: