# Function Reference

# _WinAPI_GetDllDirectory

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

#include <WinAPISys.au3>
_WinAPI_GetDllDirectory ( )

## Return Value

Success: | The search path.
Failure: | Empty string, call _WinAPI_GetLastError() to get extended error information.

## See Also

Search GetDllDirectory in MSDN Library.

## Example

    #include <WinAPIRes.au3>
    #include <WinAPISys.au3>

    If Not _WinAPI_SetDllDirectory(@ScriptDir & '\Extras') Then
        Exit
    EndIf

    Local $hModule = _WinAPI_LoadLibraryEx('Resources.dll', $LOAD_LIBRARY_AS_DATAFILE)

    ConsoleWrite('Path:   ' & _WinAPI_GetDllDirectory() & @CRLF)
    ConsoleWrite('Module: ' & $hModule & @CRLF)

    _WinAPI_FreeLibrary($hModule)