コード例 #1
0
ファイル: CoreMain.cpp プロジェクト: Emiyasviel/Arianrhod
Int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWChar lpCmdLine, Int nCmdShow)
{
    Int   Result;

    UNREFERENCED_PARAMETER(hInstance);
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);
    UNREFERENCED_PARAMETER(nCmdShow);

    g_HeapHandle = RtlCreateHeap(0, NULL, 0, 0, NULL, NULL);
//    MyLib_Initialize();
/*
    WChar end;
    lpCmdLine = GetCommandLineW();
    end = *lpCmdLine++ == '\"' ? '\"' : ' ';
    while (*lpCmdLine && *lpCmdLine != end) ++lpCmdLine;
    if (*++lpCmdLine)
    {
        while (*lpCmdLine == ' ' || *lpCmdLine == '\t') ++lpCmdLine;
    }
*/
    Result = WinMain2(/*GetModuleHandleW*/(NULL), 0, lpCmdLine, SW_SHOWDEFAULT);

    RtlDestroyHeap(g_HeapHandle);
//    MyLib_UnInitialize();

    NtTerminateProcess(NtCurrentProcess(), Result);
}
コード例 #2
0
ファイル: Main.cpp プロジェクト: 0vermind/NeoLoader
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
  #ifdef UNDER_CE
  LPWSTR
  #else
  LPSTR
  #endif
  /* lpCmdLine */, int /* nCmdShow */)
{
  g_hInstance = (HINSTANCE)hInstance;

  NT_CHECK

  try
  {
    return WinMain2();
  }
  catch(const CNewException &)
  {
    ErrorMessageForHRESULT(E_OUTOFMEMORY);
    return NExitCode::kMemoryError;
  }
  catch(...)
  {
    ShowErrorMessage(kUnknownExceptionMessage);
    return NExitCode::kFatalError;
  }
}
コード例 #3
0
ファイル: Main.cpp プロジェクト: BIAINC/7Zip
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */)
{
  g_hInstance = (HINSTANCE)hInstance;
  #ifndef _UNICODE
  g_IsNT = IsItWindowsNT();
  #endif
  try
  {
    return WinMain2();
  }
  catch(const CNewException &)
  {
    ErrorMessageForHRESULT(E_OUTOFMEMORY);
    return NExitCode::kMemoryError;
  }
  catch(...)
  {
    ShowErrorMessage(kUnknownExceptionMessage);
    return NExitCode::kFatalError;
  }
}
コード例 #4
0
ファイル: HDCalc.cpp プロジェクト: Emiyasviel/Arianrhod
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    lpCmdLine = GetCommandLine() + 1;
    while (*lpCmdLine != '"') ++lpCmdLine;
    ExitProcess(WinMain2(GetModuleHandleA(NULL), 0, ++lpCmdLine, SW_SHOWDEFAULT));
}