equal
deleted
inserted
replaced
58 FARPROC p; |
58 FARPROC p; |
59 |
59 |
60 while (*dll++ != '\0'); |
60 while (*dll++ != '\0'); |
61 if (*dll == '\0') break; |
61 if (*dll == '\0') break; |
62 #if defined(WINCE) |
62 #if defined(WINCE) |
63 p = GetProcAddress(lib, MB_TO_WIDE(dll); |
63 p = GetProcAddress(lib, MB_TO_WIDE(dll)); |
64 #else |
64 #else |
65 p = GetProcAddress(lib, dll); |
65 p = GetProcAddress(lib, dll); |
66 #endif |
66 #endif |
67 if (p == NULL) return false; |
67 if (p == NULL) return false; |
68 *proc++ = (Function)p; |
68 *proc++ = (Function)p; |
864 #define _OUT_TO_MSGBOX 2 |
864 #define _OUT_TO_MSGBOX 2 |
865 #define _REPORT_ERRMODE 3 |
865 #define _REPORT_ERRMODE 3 |
866 int _set_error_mode(int); |
866 int _set_error_mode(int); |
867 #endif |
867 #endif |
868 |
868 |
869 int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, |
869 #if defined(WINCE) |
|
870 int APIENTRY WinMain |
|
871 #else |
|
872 int APIENTRY _tWinMain |
|
873 #endif |
|
874 (HINSTANCE hInstance, HINSTANCE hPrevInstance, |
870 LPTSTR lpCmdLine, int nCmdShow) |
875 LPTSTR lpCmdLine, int nCmdShow) |
871 { |
876 { |
872 int argc; |
877 int argc; |
873 char *argv[64]; // max 64 command line arguments |
878 char *argv[64]; // max 64 command line arguments |
874 char *cmdline; |
879 char *cmdline; |
909 } _except (ExceptionHandler(_exception_info())) {} |
914 } _except (ExceptionHandler(_exception_info())) {} |
910 #endif |
915 #endif |
911 |
916 |
912 return 0; |
917 return 0; |
913 } |
918 } |
|
919 |
|
920 #if defined(WINCE) |
|
921 void GetCurrentDirectoryW(int length, wchar_t *path) |
|
922 { |
|
923 wchar_t *pDest = NULL; |
|
924 /* Get the name of this module */ |
|
925 GetModuleFileName(NULL, path, length); |
|
926 |
|
927 /* Remove the executable name, this we call CurrentDir */ |
|
928 pDest = wcsrchr(path, '\\'); |
|
929 if (pDest != NULL) { |
|
930 int result = pDest - path + 1; |
|
931 path[result] = '\0'; |
|
932 } |
|
933 } |
|
934 #endif |
914 |
935 |
915 void DeterminePaths(void) |
936 void DeterminePaths(void) |
916 { |
937 { |
917 char *s, *cfg; |
938 char *s, *cfg; |
918 wchar_t path[MAX_PATH]; |
939 wchar_t path[MAX_PATH]; |