Kernel32GetDllDirectory(UInt32, IntPtr) Method

Retrieves the application-specific portion of the search path used to locate DLLs for the application.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

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.

Remarks

See Also