Changeset 3005 for trunk/src/kernel32
- Timestamp:
- Mar 4, 2000, 8:52:37 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/directory.cpp
r2973 r3005 1 /* $Id: directory.cpp,v 1.1 6 2000-03-02 19:17:20sandervl Exp $ */1 /* $Id: directory.cpp,v 1.17 2000-03-04 19:52:35 sandervl Exp $ */ 2 2 3 3 /* … … 5 5 * 6 6 * Copyright 1998 Sander van Leeuwen 7 * 8 * NOTE: Directory creation has to be done in install program (odin\win) 7 9 * 8 10 * Parts based on Wine code (991031) (files\directory.c) -
trunk/src/kernel32/hmdevio.cpp
r2952 r3005 1 /* $Id: hmdevio.cpp,v 1. 3 2000-02-29 22:44:02sandervl Exp $ */1 /* $Id: hmdevio.cpp,v 1.4 2000-03-04 19:52:36 sandervl Exp $ */ 2 2 3 3 /* … … 114 114 } 115 115 116 tryopen: 116 117 rc = DosOpen( szOS2Name, /* File path name */ 117 118 &hfFileHandle, /* File handle */ … … 123 124 0L); /* No extended attribute */ 124 125 126 if(rc == ERROR_TOO_MANY_OPEN_FILES) { 127 ULONG CurMaxFH; 128 LONG ReqCount = 32; 129 130 rc = DosSetRelMaxFH(&ReqCount, &CurMaxFH); 131 if(rc) { 132 dprintf(("DosSetRelMaxFH returned %d", rc)); 133 return rc; 134 } 135 dprintf(("DosOpen failed -> increased nr open files to %d", CurMaxFH)); 136 goto tryopen; 137 } 138 125 139 dprintf(("DosOpen %s returned %d\n", szOS2Name, rc)); 126 140 -
trunk/src/kernel32/initsystem.cpp
r2984 r3005 1 /* $Id: initsystem.cpp,v 1. 6 2000-03-03 11:15:57sandervl Exp $ */1 /* $Id: initsystem.cpp,v 1.7 2000-03-04 19:52:36 sandervl Exp $ */ 2 2 /* 3 3 * Odin system initialization (registry & directories) … … 113 113 // if(RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &hkey) != ERROR_SUCCESS) 114 114 // { 115 strcpy(shellpath, InternalGet SystemDirectoryA());116 strcat(shellpath, "\\ WIN\\Favorites");115 strcpy(shellpath, InternalGetWindowsDirectoryA()); 116 strcat(shellpath, "\\Favorites"); 117 117 CreateDirectoryA(shellpath, NULL); 118 118 RegSetValueExA(hkey,"Favorites",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 119 strcpy(shellpath, InternalGet SystemDirectoryA());120 strcat(shellpath, "\\ WIN\\Programs\\Startup");119 strcpy(shellpath, InternalGetWindowsDirectoryA()); 120 strcat(shellpath, "\\Programs\\Startup"); 121 121 CreateDirectoryA(shellpath, NULL); 122 122 RegSetValueExA(hkey,"Startup",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 123 strcpy(shellpath, InternalGet SystemDirectoryA());124 strcat(shellpath, "\\ WIN\\Desktop");123 strcpy(shellpath, InternalGetWindowsDirectoryA()); 124 strcat(shellpath, "\\Desktop"); 125 125 CreateDirectoryA(shellpath, NULL); 126 126 RegSetValueExA(hkey,"Desktop",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 127 strcpy(shellpath, InternalGet SystemDirectoryA());128 strcat(shellpath, "\\ WIN\\Start Menu\\Programs");127 strcpy(shellpath, InternalGetWindowsDirectoryA()); 128 strcat(shellpath, "\\Start Menu\\Programs"); 129 129 CreateDirectoryA(shellpath, NULL); 130 130 RegSetValueExA(hkey,"Programs",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 131 strcpy(shellpath, InternalGet SystemDirectoryA());132 strcat(shellpath, "\\ WIN\\Fonts");131 strcpy(shellpath, InternalGetWindowsDirectoryA()); 132 strcat(shellpath, "\\Fonts"); 133 133 CreateDirectoryA(shellpath, NULL); 134 134 RegSetValueExA(hkey,"Fonts",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 135 strcpy(shellpath, InternalGet SystemDirectoryA());136 strcat(shellpath, "\\ WIN\\SendTo");135 strcpy(shellpath, InternalGetWindowsDirectoryA()); 136 strcat(shellpath, "\\SendTo"); 137 137 CreateDirectoryA(shellpath, NULL); 138 138 RegSetValueExA(hkey,"SendTo",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 139 strcpy(shellpath, InternalGet SystemDirectoryA());140 strcat(shellpath, "\\ WIN\\Start Menu");139 strcpy(shellpath, InternalGetWindowsDirectoryA()); 140 strcat(shellpath, "\\Start Menu"); 141 141 CreateDirectoryA(shellpath, NULL); 142 142 RegSetValueExA(hkey,"Start Menu",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 143 strcpy(shellpath, InternalGet SystemDirectoryA());144 strcat(shellpath, "\\ WIN\\ShellNew");143 strcpy(shellpath, InternalGetWindowsDirectoryA()); 144 strcat(shellpath, "\\ShellNew"); 145 145 CreateDirectoryA(shellpath, NULL); 146 146 RegSetValueExA(hkey,"Templates",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 147 strcpy(shellpath, InternalGet SystemDirectoryA());148 strcat(shellpath, "\\ WIN\\Recent");147 strcpy(shellpath, InternalGetWindowsDirectoryA()); 148 strcat(shellpath, "\\Recent"); 149 149 CreateDirectoryA(shellpath, NULL); 150 150 RegSetValueExA(hkey,"Recent",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 151 strcpy(shellpath, InternalGet SystemDirectoryA());152 strcat(shellpath, "\\ WIN\\NetHood");151 strcpy(shellpath, InternalGetWindowsDirectoryA()); 152 strcat(shellpath, "\\NetHood"); 153 153 CreateDirectoryA(shellpath, NULL); 154 154 RegSetValueExA(hkey,"NetHood",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 155 strcpy(shellpath, InternalGet SystemDirectoryA());156 strcat(shellpath, "\\ WIN\\My Documents");155 strcpy(shellpath, InternalGetWindowsDirectoryA()); 156 strcat(shellpath, "\\My Documents"); 157 157 CreateDirectoryA(shellpath, NULL); 158 158 RegSetValueExA(hkey,"Personal",0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); -
trunk/src/kernel32/windllbase.cpp
r2802 r3005 1 /* $Id: windllbase.cpp,v 1. 9 2000-02-16 14:22:11sandervl Exp $ */1 /* $Id: windllbase.cpp,v 1.10 2000-03-04 19:52:36 sandervl Exp $ */ 2 2 3 3 /* … … 49 49 : Win32ImageBase(hinstance), 50 50 referenced(0), fSkipEntryCalls(FALSE), 51 fAttachedToProcess(FALSE), fUnloaded(FALSE) 51 fAttachedToProcess(FALSE), fUnloaded(FALSE), fDynamicLoad(FALSE) 52 52 { 53 53 dllEntryPoint = DllEntryPoint; … … 96 96 Win32DllBase::~Win32DllBase() 97 97 { 98 Win32DllBase *dll = head;99 100 98 dprintf(("Win32DllBase::~Win32DllBase %s", szModule)); 101 99 … … 110 108 } 111 109 else { 110 Win32DllBase *dll = head; 112 111 while(dll && dll->next != this) { 113 112 dll = dll->next; … … 294 293 //****************************************************************************** 295 294 //****************************************************************************** 296 void Win32DllBase::deleteAll() 297 { 295 void Win32DllBase::deleteAll(BOOL fDynamicLoad) 296 { 297 Win32DllBase *dll = Win32DllBase::head, *tmp; 298 298 299 #ifdef DEBUG 299 300 dlllistmutex.enter(); 300 Win32DllBase *dll = head;301 301 302 302 dprintf(("Win32DllBase::deleteAll: List of loaded dlls:")); … … 306 306 } 307 307 dlllistmutex.leave(); 308 dll = Win32DllBase::head; 308 309 #endif 309 310 310 while(Win32DllBase::head) { 311 delete Win32DllBase::head; 311 while(dll) { 312 if(fDynamicLoad || !dll->fDynamicLoad) { 313 tmp = dll->next; 314 dll->Release(); 315 dll = tmp; 316 } 317 else dll = dll->next; 312 318 } 313 319 } -
trunk/src/kernel32/winexebase.cpp
r2802 r3005 1 /* $Id: winexebase.cpp,v 1. 5 2000-02-16 14:22:11sandervl Exp $ */1 /* $Id: winexebase.cpp,v 1.6 2000-03-04 19:52:36 sandervl Exp $ */ 2 2 3 3 /* … … 59 59 Win32ExeBase::~Win32ExeBase() 60 60 { 61 //First delete all dlls that were loaded by the exe or dlls 62 //Then delete all dlls loaded by LoadLibrary (to avoid that we 63 //delete some dlls before the dll, that loaded it, is destroyed) 61 64 Win32DllBase::deleteAll(); 65 Win32DllBase::deleteAll(TRUE); 66 62 67 WinExe = NULL; 63 68 if(cmdLineA) -
trunk/src/kernel32/winimagepeldr.cpp
r2863 r3005 1 /* $Id: winimagepeldr.cpp,v 1.3 3 2000-02-22 23:53:03sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.34 2000-03-04 19:52:36 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 #define PRIVATE_LOGGING 37 37 #include <misc.h> 38 #include <win32 type.h>38 #include <win32api.h> 39 39 #include <winimagebase.h> 40 40 #include <winimagepeldr.h> … … 569 569 APIRET rc; 570 570 571 //Round down to nearest page boundary 572 virtAddress = virtAddress & ~0xFFF; 573 571 574 section = findSectionByOS2Addr(virtAddress); 572 575 if(section == NULL) { … … 1408 1411 return(FALSE); 1409 1412 } 1410 WinDll->AddRef();1411 1413 } 1412 1414 dprintf((LOG, "**********************************************************************" )); … … 1555 1557 1556 1558 if( r != MBID_IGNORE ) 1557 exit(987);1559 ExitProcess(987); 1558 1560 1559 1561 fIgnore = TRUE; -
trunk/src/kernel32/wprocess.cpp
r2984 r3005 1 /* $Id: wprocess.cpp,v 1.7 0 2000-03-03 11:16:00sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.71 2000-03-04 19:52:37 sandervl Exp $ */ 2 2 3 3 /* … … 344 344 //****************************************************************************** 345 345 //****************************************************************************** 346 static void _System Win32DllExitList(ULONG reason)347 {348 dprintf(("Win32DllExitList %d\n", reason));349 350 if(WinExe) {351 delete(WinExe);352 WinExe = NULL;353 }354 return;355 }356 //******************************************************************************357 //******************************************************************************358 346 VOID WIN32API ExitProcess(DWORD exitcode) 359 347 { … … 363 351 SetOS2ExceptionChain(-1); 364 352 365 Win32DllExitList(0); 366 367 //Note: Needs to be done after Win32DllExitList (destruction of exe + dll objects) 353 if(WinExe) { 354 delete(WinExe); 355 WinExe = NULL; 356 } 357 358 //Note: Needs to be done after deleting WinExe (destruction of exe + dll objects) 368 359 //Flush and delete all open memory mapped files 369 360 Win32MemMap::deleteAll(); … … 458 449 peldrDll->setNoEntryCalls(); 459 450 } 451 //Set flag so this dll doesn't get automatically deleted in ExitProcess 452 //(the first time); give application the chance to free it first 453 //If it's not freed, we delete it the 2nd time in ExitProcess 454 peldrDll->SetDynamicallyLoaded(); 460 455 461 456 if(peldrDll->attachProcess() == FALSE) {
Note:
See TracChangeset
for help on using the changeset viewer.