Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ldh.cc « utils « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 13655ed23f2d17f54c2dc41bb6bd1cb2ffdafb95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 || !LoadLibraryExW (cmd, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ))
    ExitProcess (0x0100);
  ExitProcess (0x0000);
}