diff options
author | Christopher Faylor <me@cgf.cx> | 2009-03-18 17:46:24 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-03-18 17:46:24 +0300 |
commit | c4509a7ac267046bd784b9abc16351428c48d24e (patch) | |
tree | 1546f2531a589373d02217bb032240015d222174 | |
parent | 9e112520ffbef2c9032caf86f6d9b6b622f57dff (diff) |
Re-add inexplicably missing ldh.cc.
-rw-r--r-- | winsup/utils/ldh.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/winsup/utils/ldh.cc b/winsup/utils/ldh.cc new file mode 100644 index 000000000..7bea569f0 --- /dev/null +++ b/winsup/utils/ldh.cc @@ -0,0 +1,17 @@ +#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 || !LoadLibraryW (cmd)) + ExitProcess (0x0100); + ExitProcess (0x0000); +} |