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.
''' <summary>
''' Retrieves the path of the shared Windows directory on a multi-user system.
''' </summary>
''' <param name="lpBuffer">A pointer to the buffer to receive the path. This path does not end with a backslash unless the Windows directory is the root directory.</param>
''' <param name="uSize">The maximum size of the buffer specified by the lpBuffer parameter, in TCHARs.</param>
''' <returns>
''' If the function succeeds, the return value is the length of the string copied to the buffer, in TCHARs, not including the terminating null character.
''' If the length is greater than the size of the buffer, the return value is the size of the buffer required to hold the path.
''' If the function fails, the return value is zero. To get extended error information, call GetLastError.
''' </returns>
''' <remarks>
''' On a system that is running Terminal Services, each user has a unique Windows directory.
''' The system Windows directory is shared by all users, so it is the directory where an application should store initialization and help files that apply to all users.
''' With Terminal Services, the GetSystemWindowsDirectory function retrieves the path of the system Windows directory,
''' while the GetWindowsDirectory function retrieves the path of a Windows directory that is private for each user. On a single-user system, GetSystemWindowsDirectory is the same as GetWindowsDirectory.
''' </remarks>
<DllImport("Kernel32.dll", EntryPoint:="GetSystemWindowsDirectoryW", SetLastError:=True, CharSet:=CharSet.Unicode)> _
Public Function GetSystemWindowsDirectory(<MarshalAs(UnmanagedType.LPTStr)>lpBuffer As System.Text.StringBuilder, _
uSize As UInteger) As UInteger
End Function
VB Signature:
Declare Function GetSystemWindowsDirectoryW Lib "kernel32.dll" (TODO) As TODO
Public Declare Function GetSystemWindowsDirectory Lib "kernel" Alias "GetSystemWindowsDirectoryA" _
(ByVal pszBuffer As String, _
ByVal uSize As Integer) As Integer
User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
public static String GetSystemWindowsDirectory()
{
Int32 size = 100;
StringBuilder sb = new StringBuilder(size);
UInt32 i = 100;
GetSystemWindowsDirectory(sb, i);
Please add some!
return sb.ToString();
}
Alternative Managed API:
Do you know one? Please contribute it!
www.freewebs.com\omnicoder\apireplacement.dll
TODO - a short description
9/28/2018 12:45:31 AM - -31.47.84.113
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).