Kernel32GetDllDirectory(UInt32, IntPtr) 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.Unicode, SetLastError = true)]
public static uint GetDllDirectory(
uint bufferLength,
IntPtr buffer
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, SetLastError := true>]
Public Shared Function GetDllDirectory (
bufferLength As UInteger,
buffer As IntPtr
) As UInteger
Dim bufferLength As UInteger
Dim buffer As IntPtr
Dim returnValue As UInteger
returnValue = Kernel32.GetDllDirectory(bufferLength,
buffer)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, SetLastError = true)]
static unsigned int GetDllDirectory(
unsigned int bufferLength,
IntPtr buffer
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)>]
static member GetDllDirectory :
bufferLength : uint32 *
buffer : IntPtr -> 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 IntPtr
-
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.