| 6815:013a0e02e260 | 6816:b14a3043ed09 |
|---|---|
| 6 * Description: Entry point for win32 gaim, and various win32 dependant | 6 * Description: Entry point for win32 gaim, and various win32 dependant |
| 7 * routines. | 7 * routines. |
| 8 */ | 8 */ |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| 11 #include <glib.h> | |
| 11 | 12 |
| 12 /* | 13 /* |
| 13 * GLOBALS | 14 * GLOBALS |
| 14 */ | 15 */ |
| 15 __declspec(dllimport) HINSTANCE gaimexe_hInstance; | 16 __declspec(dllimport) HINSTANCE gaimexe_hInstance; |
| 20 | 21 |
| 21 /* | 22 /* |
| 22 * PROTOTYPES | 23 * PROTOTYPES |
| 23 */ | 24 */ |
| 24 extern int gaim_main( int, char** ); | 25 extern int gaim_main( int, char** ); |
| 25 | 26 extern char* wgaim_install_dir(); |
| 26 | 27 |
| 27 #ifdef __GNUC__ | 28 #ifdef __GNUC__ |
| 28 # ifndef _stdcall | 29 # ifndef _stdcall |
| 29 # define _stdcall __attribute__((stdcall)) | 30 # define _stdcall __attribute__((stdcall)) |
| 30 # endif | 31 # endif |
| 34 WinMain (struct HINSTANCE__ *hInstance, | 35 WinMain (struct HINSTANCE__ *hInstance, |
| 35 struct HINSTANCE__ *hPrevInstance, | 36 struct HINSTANCE__ *hPrevInstance, |
| 36 char *lpszCmdLine, | 37 char *lpszCmdLine, |
| 37 int nCmdShow) | 38 int nCmdShow) |
| 38 { | 39 { |
| 40 char* drmingw; | |
| 39 gaimexe_hInstance = hInstance; | 41 gaimexe_hInstance = hInstance; |
| 42 | |
| 43 /* Load exception handler if we have it */ | |
| 44 drmingw = g_build_filename(wgaim_install_dir(), "exchndl.dll", NULL); | |
| 45 LoadLibrary(drmingw); | |
| 46 g_free(drmingw); | |
| 47 | |
| 40 return gaim_main (__argc, __argv); | 48 return gaim_main (__argc, __argv); |
| 41 } | 49 } |
| 42 | 50 |