- Timestamp:
- Oct 29, 2002, 4:37:07 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/initcomdlg32.cpp
r6645 r9376 1 /* $Id: initcomdlg32.cpp,v 1. 3 2001-09-05 12:12:02 birdExp $ */1 /* $Id: initcomdlg32.cpp,v 1.4 2002-10-29 15:37:07 sandervl Exp $ */ 2 2 /* 3 3 * DLL entry point … … 26 26 #define INCL_DOSMODULEMGR 27 27 #define INCL_DOSPROCESS 28 #define INCL_WINSHELLDATA 28 29 #include <os2wrap.h> //Odin32 OS/2 api wrappers 29 30 #include <stdlib.h> … … 32 33 #include <odin.h> 33 34 #include <win32type.h> 35 #include <win32api.h> 34 36 #include <winconst.h> 35 37 #include <odinlx.h> … … 53 55 { 54 56 case DLL_PROCESS_ATTACH: 57 { 58 //Write default printer name to win.ini 59 char achDefPrnName[256]; 60 if(PrfQueryProfileString(HINI_PROFILE, "PM_SPOOLER", "PRINTER", "", achDefPrnName, 61 sizeof(achDefPrnName)) > 1) 62 { 63 int len = strlen(achDefPrnName); 64 if(achDefPrnName[len-1] == ';') { 65 achDefPrnName[len-1] = 0; 66 } 67 strcat(achDefPrnName, ","); 68 WriteProfileStringA("windows", "device", achDefPrnName); 69 } 70 return COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad); 71 } 72 55 73 case DLL_THREAD_ATTACH: 56 74 case DLL_THREAD_DETACH: 57 return COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad);58 59 75 case DLL_PROCESS_DETACH: 60 COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad);61 return TRUE;76 COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad); 77 return TRUE; 62 78 } 63 79 return FALSE; … … 84 100 switch (ulFlag) { 85 101 case 0 : 86 dllHandle = RegisterLxDll(hModule, LibMainComdlg32, (PVOID)&comdlg32_PEResTab,102 dllHandle = RegisterLxDll(hModule, LibMainComdlg32, (PVOID)&comdlg32_PEResTab, 87 103 COMDLG32_MAJORIMAGE_VERSION, COMDLG32_MINORIMAGE_VERSION, 88 104 IMAGE_SUBSYSTEM_WINDOWS_GUI); 89 105 if(dllHandle == 0) 90 return 0UL;91 106 return 0UL; 107 92 108 break; 93 109 case 1 : 94 110 if(dllHandle) { 95 UnregisterLxDll(dllHandle);111 UnregisterLxDll(dllHandle); 96 112 } 97 113 break;
Note:
See TracChangeset
for help on using the changeset viewer.