Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
<DllImport("kernel32.dll")> _
Shared Function GetFullPathName(ByVal lpFileName As String, ByVal nBufferLength As Int32, <Out()> ByVal lpBuffer As System.Text.StringBuilder, <Out()> ByVal lpFilePart As System.Text.StringBuilder) As Int32
User-Defined Types:
None.
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
C# Sample
int bufsz = 1; // We'll grow this as necessary
string sRel = @"c:\windows\System\..\system32\desktop.ini"; // Note relative path
StringBuilder sbFull = new StringBuilder(bufsz); // Full resolved path will go here
StringBuilder sbFile = new StringBuilder(bufsz); // Filename will go here
uint u = GetFullPathName(sRel, (uint)bufsz, sbFull, out sbFile); // 1st call: Get necessary bufsz
if (u > bufsz) // 'u' should be >1
{
bufsz = (int)u + 10; // Required size plus a few
sbFull = new StringBuilder(bufsz); // Re-create objects w/ proper size
sbFile = new StringBuilder(bufsz); // "
u = GetFullPathName(sRel, (uint)bufsz, sbFull, out sbFile); // Try again, this should succeed
// 'sbFull' should now contain "c:\windows\system32\desktop.ini"
// and 'sbFile' should contain "desktop.ini"
}
Alternative Managed API:
System.IO.FileSystemInfo.FullName or System.IO.Path.GetFullPath.
The GetFullPathName API
4/26/2014 8:27:58 AM - -213.34.49.75
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).