- Timestamp:
- Jan 20, 2003, 11:46:28 AM (23 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/initkernel32.cpp
r9496 r9693 1 /* $Id: initkernel32.cpp,v 1.2 4 2002-12-13 16:46:44sandervl Exp $1 /* $Id: initkernel32.cpp,v 1.25 2003-01-20 10:46:26 sandervl Exp $ 2 2 * 3 3 * KERNEL32 DLL entry point … … 196 196 InitDynamicRegistry(); 197 197 198 //Load LVM subsystem for volume/mountpoint win32 functions199 OSLibLVMInit();200 201 198 //Set the process affinity mask to the system affinity mask 202 199 DWORD dwProcessAffinityMask, dwSystemAffinityMask; -
trunk/src/kernel32/oslibdos.cpp
r9691 r9693 1 /* $Id: oslibdos.cpp,v 1.11 3 2003-01-18 20:11:46sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.114 2003-01-20 10:46:27 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 1005 1005 int winError = error2WinError(rc); 1006 1006 if (winError == ERROR_OPEN_FAILED_W || winError == ERROR_PATH_NOT_FOUND_W) 1007 winError = ERROR_FILE_NOT_FOUND_W; 1007 { 1008 //Windows returns ERROR_FILE_EXISTS if create new & file exists 1009 if(fuCreate == CREATE_NEW_W) { 1010 winError = ERROR_FILE_EXISTS_W; 1011 } 1012 else winError = ERROR_FILE_NOT_FOUND_W; 1013 } 1008 1014 SetLastError(winError); 1009 1015 return INVALID_HANDLE_VALUE_W; -
trunk/src/kernel32/osliblvm.cpp
r9304 r9693 1 /* $Id: osliblvm.cpp,v 1. 4 2002-09-27 14:35:56sandervl Exp $ */1 /* $Id: osliblvm.cpp,v 1.5 2003-01-20 10:46:27 sandervl Exp $ */ 2 2 3 3 /* … … 52 52 static BOOL fLVMOpened = FALSE; 53 53 54 static void Close_LVM_Engine ( void ); 55 56 //****************************************************************************** 57 //****************************************************************************** 58 static BOOL OSLibLVMInit() 59 { 60 APIRET rc; 61 CHAR szModuleFailure[CCHMAXPATH]; 62 63 rc = DosLoadModule(szModuleFailure, sizeof(szModuleFailure), "LVM.DLL", (HMODULE *)&hModLVM); 64 if(rc) { 65 return FALSE; 66 } 67 rc = DosQueryProcAddr(hModLVM, 0, "Open_LVM_Engine", (PFN *)&pfnOpen_LVM_Engine); 68 if(rc) goto fail; 69 rc = DosQueryProcAddr(hModLVM, 0, "Close_LVM_Engine", (PFN *)&pfnClose_LVM_Engine); 70 if(rc) goto fail; 71 rc = DosQueryProcAddr(hModLVM, 0, "Get_Drive_Control_Data", (PFN *)&pfnGet_Drive_Control_Data); 72 if(rc) goto fail; 73 rc = DosQueryProcAddr(hModLVM, 0, "Get_Drive_Status", (PFN *)&pfnGet_Drive_Status); 74 if(rc) goto fail; 75 rc = DosQueryProcAddr(hModLVM, 0, "Get_Partitions", (PFN *)&pfnGet_Partitions); 76 if(rc) goto fail; 77 rc = DosQueryProcAddr(hModLVM, 0, "Get_Partition_Handle", (PFN *)&pfnGet_Partition_Handle); 78 if(rc) goto fail; 79 rc = DosQueryProcAddr(hModLVM, 0, "Get_Partition_Information", (PFN *)&pfnGet_Partition_Information); 80 if(rc) goto fail; 81 rc = DosQueryProcAddr(hModLVM, 0, "Get_Volume_Control_Data", (PFN *)&pfnGet_Volume_Control_Data); 82 if(rc) goto fail; 83 rc = DosQueryProcAddr(hModLVM, 0, "Get_Volume_Information", (PFN *)&pfnGet_Volume_Information); 84 if(rc) goto fail; 85 rc = DosQueryProcAddr(hModLVM, 0, "Free_Engine_Memory", (PFN *)&pfnFree_Engine_Memory); 86 if(rc) goto fail; 87 rc = DosQueryProcAddr(hModLVM, 0, "Read_Sectors", (PFN *)&pfnRead_Sectors); 88 if(rc) goto fail; 89 rc = DosQueryProcAddr(hModLVM, 0, "Write_Sectors", (PFN *)&pfnWrite_Sectors); 90 if(rc) goto fail; 91 92 return TRUE; 93 94 fail: 95 if(hModLVM) { 96 DosFreeModule(hModLVM); 97 hModLVM = 0; 98 } 99 return FALSE; 100 } 101 //****************************************************************************** 102 //****************************************************************************** 103 void OSLibLVMExit() 104 { 105 if(fLVMOpened) { 106 Close_LVM_Engine(); 107 } 108 if(hModLVM) { 109 DosFreeModule(hModLVM); 110 hModLVM = 0; 111 } 112 } 54 113 //****************************************************************************** 55 114 //****************************************************************************** … … 57 116 { 58 117 USHORT sel; 118 119 //Load LVM dll 120 OSLibLVMInit(); 59 121 60 122 sel = RestoreOS2FS(); … … 198 260 SetFS(sel); 199 261 return; 200 }201 //******************************************************************************202 //******************************************************************************203 BOOL OSLibLVMInit()204 {205 APIRET rc;206 CHAR szModuleFailure[CCHMAXPATH];207 208 rc = DosLoadModule(szModuleFailure, sizeof(szModuleFailure), "LVM.DLL", (HMODULE *)&hModLVM);209 if(rc) {210 return FALSE;211 }212 rc = DosQueryProcAddr(hModLVM, 0, "Open_LVM_Engine", (PFN *)&pfnOpen_LVM_Engine);213 if(rc) goto fail;214 rc = DosQueryProcAddr(hModLVM, 0, "Close_LVM_Engine", (PFN *)&pfnClose_LVM_Engine);215 if(rc) goto fail;216 rc = DosQueryProcAddr(hModLVM, 0, "Get_Drive_Control_Data", (PFN *)&pfnGet_Drive_Control_Data);217 if(rc) goto fail;218 rc = DosQueryProcAddr(hModLVM, 0, "Get_Drive_Status", (PFN *)&pfnGet_Drive_Status);219 if(rc) goto fail;220 rc = DosQueryProcAddr(hModLVM, 0, "Get_Partitions", (PFN *)&pfnGet_Partitions);221 if(rc) goto fail;222 rc = DosQueryProcAddr(hModLVM, 0, "Get_Partition_Handle", (PFN *)&pfnGet_Partition_Handle);223 if(rc) goto fail;224 rc = DosQueryProcAddr(hModLVM, 0, "Get_Partition_Information", (PFN *)&pfnGet_Partition_Information);225 if(rc) goto fail;226 rc = DosQueryProcAddr(hModLVM, 0, "Get_Volume_Control_Data", (PFN *)&pfnGet_Volume_Control_Data);227 if(rc) goto fail;228 rc = DosQueryProcAddr(hModLVM, 0, "Get_Volume_Information", (PFN *)&pfnGet_Volume_Information);229 if(rc) goto fail;230 rc = DosQueryProcAddr(hModLVM, 0, "Free_Engine_Memory", (PFN *)&pfnFree_Engine_Memory);231 if(rc) goto fail;232 rc = DosQueryProcAddr(hModLVM, 0, "Read_Sectors", (PFN *)&pfnRead_Sectors);233 if(rc) goto fail;234 rc = DosQueryProcAddr(hModLVM, 0, "Write_Sectors", (PFN *)&pfnWrite_Sectors);235 if(rc) goto fail;236 237 return TRUE;238 239 fail:240 if(hModLVM) {241 DosFreeModule(hModLVM);242 hModLVM = 0;243 }244 return FALSE;245 }246 //******************************************************************************247 //******************************************************************************248 void OSLibLVMExit()249 {250 if(fLVMOpened) {251 Close_LVM_Engine();252 }253 if(hModLVM) {254 DosFreeModule(hModLVM);255 hModLVM = 0;256 }257 262 } 258 263 //****************************************************************************** -
trunk/src/kernel32/osliblvm.h
r9617 r9693 1 /* $Id: osliblvm.h,v 1. 5 2003-01-05 12:31:24sandervl Exp $ */1 /* $Id: osliblvm.h,v 1.6 2003-01-20 10:46:27 sandervl Exp $ */ 2 2 /* 3 3 * OS/2 LVM (Logical Volume Management) functions … … 327 327 #define VOLUME_NAME_PREFIX "\\\\?\\Volume\\" 328 328 329 BOOL OSLibLVMInit();330 329 void OSLibLVMExit(); 331 330 HANDLE OSLibLVMQueryVolumeControlData(); -
trunk/src/kernel32/oslibmisc.cpp
r9678 r9693 1 /* $Id: oslibmisc.cpp,v 1.1 6 2003-01-16 00:44:31sandervl Exp $ */1 /* $Id: oslibmisc.cpp,v 1.17 2003-01-20 10:46:28 sandervl Exp $ */ 2 2 /* 3 3 * Misc OS/2 util. procedures … … 280 280 ULONG OSLibWinQueryMsgQueue(ULONG hab) 281 281 { 282 ULONG hmq; 283 284 hmq = (ULONG)WinCreateMsgQueue((HAB)hab, 0); 282 ULONG hmq; 283 APIRET rc; 284 PTIB ptib; 285 PPIB ppib; 286 287 rc = DosGetInfoBlocks(&ptib, &ppib); 288 if(rc != NO_ERROR) { 289 dprintf(("DosGetInfoBlocks failed with rc %d", rc)); 290 DebugInt3(); 291 return 0; 292 } 293 if(ppib->pib_ultype == 2) { 294 dprintf(("Warning: app type changed back to VIO!!")); 295 ppib->pib_ultype = 3; 296 } 297 hmq = WinQueueFromID(hab, ppib->pib_ulpid, ptib->tib_ptib2->tib2_ultid); 298 285 299 if(!hmq) { 286 PTIB ptib;287 PPIB ppib; 288 289 DosGetInfoBlocks(&ptib, &ppib);290 291 hmq = WinQueueFromID(hab, ppib->pib_ulpid, ptib->tib_ptib2->tib2_ultid);300 dprintf(("WinQueueFromID %x %x %x proc type %x failed with error %x", hab, ppib->pib_ulpid, ptib->tib_ptib2->tib2_ultid, ppib->pib_ultype, WinGetLastError(hab))); 301 302 hmq = (ULONG)WinCreateMsgQueue((HAB)hab, 0); 303 if(!hmq) { 304 dprintf(("WinCreateMsgQueue failed with error %x", WinGetLastError(hab))); 305 } 292 306 } 293 307 return hmq; -
trunk/src/kernel32/thread.cpp
r9667 r9693 1 /* $Id: thread.cpp,v 1.4 8 2003-01-13 16:51:40sandervl Exp $ */1 /* $Id: thread.cpp,v 1.49 2003-01-20 10:46:28 sandervl Exp $ */ 2 2 3 3 /* … … 310 310 311 311 winteb->o.odin.hab = OSLibWinInitialize(); 312 dprintf(("Thread HAB %x", winteb->o.odin.hab)); 312 313 winteb->o.odin.hmq = OSLibWinQueryMsgQueue(winteb->o.odin.hab); 313 314 rc = OSLibWinSetCp(winteb->o.odin.hmq, GetDisplayCodepage()); -
trunk/src/kernel32/wprocess.cpp
r9681 r9693 1 /* $Id: wprocess.cpp,v 1.17 5 2003-01-16 13:16:59sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.176 2003-01-20 10:46:28 sandervl Exp $ */ 2 2 3 3 /* … … 1881 1881 else pThreadDB->o.odin.pidDebuggee = 0; 1882 1882 1883 if(lpProcessInfo) 1884 { 1885 lpProcessInfo->dwThreadId = MAKE_THREADID(lpProcessInfo->dwProcessId, lpProcessInfo->dwThreadId); 1886 } 1887 1883 1888 return(TRUE); 1884 1889 }
Note:
See TracChangeset
for help on using the changeset viewer.