Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

  1. // GramComp.cpp : Defines the entry point for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "resource.h"
  5. #include "comp.h"
  6. #include <sapi.h>
  7. #include <assertwithstack.cpp>
  8. // Foward declarations of functions included in this code module:
  9. BOOL CallOpenFileDialog( HWND hWnd, TCHAR* szFileName, TCHAR* szFilter );
  10. BOOL CallSaveFileDialog( HWND hWnd, TCHAR* szSaveFile );
  11. HRESULT FileSave( HWND hWnd, CCompiler* pComp, TCHAR* szSaveFile );
  12. HRESULT Compile( HWND, TCHAR*, TCHAR*, CCompiler* );
  13. void RecoEvent( HWND, CCompiler* );
  14. /************************************************************************
  15. * WinMain() *
  16. *-----------*
  17. * Description:
  18. * Main entry point for the application
  19. **************************************************************************/
  20. int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
  21. LPSTR pCmdLine, int nCmdShow )
  22. {
  23. int iRet = 0;
  24. HRESULT hr = S_OK;
  25. #ifdef _WIN32_WCE
  26. if (SUCCEEDED(::CoInitializeEx(NULL,COINIT_MULTITHREADED)))
  27. #else
  28. if (SUCCEEDED(::CoInitialize(NULL)))
  29. #endif
  30. {
  31. {
  32. CCompiler Comp( hInstance );
  33. // Initialize the application
  34. hr = Comp.Initialize( nCmdShow );
  35. if( SUCCEEDED( hr ) )
  36. {
  37. Comp.Run();
  38. }
  39. }
  40. CoUninitialize();
  41. }
  42. return iRet;
  43. } /* WinMain */