Kernel32GetDllDirectory(UInt32, StringBuilder) Method
Retrieves the application-specific portion of the search path used to locate DLLs for the application.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static uint GetDllDirectory(
uint bufferLength,
StringBuilder buffer
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetDllDirectory (
bufferLength As UInteger,
buffer As StringBuilder
) As UInteger
Dim bufferLength As UInteger
Dim buffer As StringBuilder
Dim returnValue As UInteger
returnValue = Kernel32.GetDllDirectory(bufferLength,
buffer)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned int GetDllDirectory(
unsigned int bufferLength,
StringBuilder^ buffer
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetDllDirectory :
bufferLength : uint32 *
buffer : StringBuilder -> uint32
No code example is currently available or this language may not be supported.
- bufferLength UInt32
-
The size of the output buffer, in characters.
- buffer StringBuilder
-
A pointer to a buffer that receives the application-specific portion of the search path.
UInt32
If the function succeeds, the return value is the length of the string copied to
buffer,
in characters, not including the terminating null character.
If the return value is greater than
bufferLength, it specifies the size of the buffer required for the path.
If the function fails, the return value is zero.
To get extended error information, call
GetLastWin32Error.