newlib/winsup/utils/ldh.cc
Corinna Vinschen 552bc28f46 * ldh.cc (WinMain): Change DONT_RESOLVE_DLL_REFERENCES to
LOAD_WITH_ALTERED_SEARCH_PATH.
2010-08-28 12:12:53 +00:00

18 lines
386 B
C++

#include <windows.h>
int APIENTRY
WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
LPWSTR cmd = GetCommandLineW ();
while (*cmd)
if (*cmd != ' ' || cmd[1] != L'-' || cmd[2] != '-' || cmd[3] != ' ')
cmd++;
else
{
cmd += 4;
break;
}
if (!*cmd || !LoadLibraryExW (cmd, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ))
ExitProcess (0x0100);
ExitProcess (0x0000);
}