- Timestamp:
- Jan 14, 2001, 6:16:55 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r4739 r4946 1 /* $Id: HandleManager.cpp,v 1.5 6 2000-12-03 10:12:32sandervl Exp $ */1 /* $Id: HandleManager.cpp,v 1.57 2001-01-14 17:16:54 sandervl Exp $ */ 2 2 3 3 /* … … 62 62 #include "HMNPipe.h" 63 63 #include <vmutex.h> 64 #include <win\thread.h> 64 65 65 66 #define DBG_LOCALLOG DBG_handlemanager … … 1851 1852 if (-1 == iIndex) /* error ? */ 1852 1853 { 1853 dprintf(("KERNEL32: HandleManager:HMWaitForSingleObject(%08xh) passed on to Open32.\n", 1854 hObject)); 1855 1854 dprintf(("KERNEL32: HandleManager:HMWaitForSingleObject(%08xh) passed on to Open32.\n", 1855 hObject)); 1856 1857 #if 1 1858 //Workaround for applications that block the PM input queue 1859 //while waiting for a child process to terminate. 1860 //(WaitSingleObject now calls MsgWaitMultipleObjects and 1861 // processes messages while waiting for the process to die) 1862 //(Napster install now doesn't block PM anymore (forcing a reboot)) 1863 1864 HMODULE hUser32 = LoadLibraryA("USER32.DLL"); 1865 1866 BOOL (* WINAPI pfnPeekMessageA)(LPMSG,HWND,UINT,UINT,UINT); 1867 LONG (* WINAPI pfnDispatchMessageA)(const MSG*); 1868 1869 *(FARPROC *)&pfnPeekMessageA = GetProcAddress(hUser32,"PeekMessageA"); 1870 *(FARPROC *)&pfnDispatchMessageA = GetProcAddress(hUser32,"DispatchMessageA"); 1871 1872 TEB *teb = GetThreadTEB(); 1873 1874 if(!teb || !pfnPeekMessageA || !pfnDispatchMessageA) { 1875 dprintf(("ERROR: !teb || !pfnPeekMessageA || !pfnDispatchMessageA")); 1876 DebugInt3(); 1877 return WAIT_FAILED; 1878 } 1879 1880 //TODO: Ignoring all messages could be dangerous. But processing them, 1881 //while the app doesn't expect any, isn't safe either. 1882 //-> must active check in pmwindow.cpp if this is enabled again! 1883 // teb->o.odin.fIgnoreMsgs = TRUE; 1884 1885 while(TRUE) { 1886 dwResult = (O32_MsgWaitForMultipleObjects(1, &hObject, FALSE, 1887 INFINITE, QS_ALLINPUT)); 1888 if(dwResult == WAIT_OBJECT_0 + 1) { 1889 MSG msg ; 1890 1891 while (pfnPeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 1892 { 1893 if (msg.message == WM_QUIT) return 1; 1894 1895 /* otherwise dispatch it */ 1896 pfnDispatchMessageA(&msg); 1897 1898 } // end of PeekMessage while loop 1899 } 1900 else { 1901 dprintf(("WaitForSingleObject: Process %x terminated", hObject)); 1902 break; 1903 } 1904 } 1905 // teb->o.odin.fIgnoreMsgs = FALSE; 1906 FreeLibrary(hUser32); 1907 return dwResult; 1908 } 1909 else { 1910 #else 1856 1911 // maybe handles from CreateProcess() ... 1857 1912 dwResult = O32_WaitForSingleObject(hObject, dwTimeout); 1913 #endif 1858 1914 return (dwResult); 1859 1915 } -
trunk/src/kernel32/initsystem.cpp
r4850 r4946 1 /* $Id: initsystem.cpp,v 1.2 4 2000-12-30 10:17:00sandervl Exp $ */1 /* $Id: initsystem.cpp,v 1.25 2001-01-14 17:16:54 sandervl Exp $ */ 2 2 /* 3 3 * Odin system initialization (registry, directories & environment) … … 71 71 #define CLASS_SHORTCUT "Shortcut" 72 72 #define CLASS_SHELL32DLL "shell32.dll" 73 #define CLASS_SHDOCVW "shdocvw.dll" 73 74 #define COM_CLASS_ID "CLSID" 74 75 #define COM_INPROCSERVER "InprocServer32" … … 335 336 } 336 337 RegSetValueExA(hkey, "", 0, REG_SZ, (LPBYTE)"", 0); 338 RegCloseKey(hkey); 339 340 //# Entries for IWebBrowser 341 //# Used by Internet Explorer HTML-rendering control 342 //[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}] 343 //@="Shortcut" 344 //[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}\InProcServer32] 345 //@="shdocvw.dll" 346 //"ThreadingModel"="Apartment" 347 //[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}\shellex\MayChangeDefaultMenu] 348 //@="" 349 350 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Classes\\CLSID\\{8856f961-340a-11d0-a96b-00c04fd705a2}",&hkey)!=ERROR_SUCCESS) { 351 goto initreg_error; 352 } 353 RegSetValueExA(hkey, "", 0, REG_SZ, (LPBYTE)CLASS_SHORTCUT, sizeof(CLASS_SHORTCUT)); 354 RegCloseKey(hkey); 355 356 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Classes\\CLSID\\{8856f961-340a-11d0-a96b-00c04fd705a2}\\InProcServer32",&hkey)!=ERROR_SUCCESS) { 357 goto initreg_error; 358 } 359 RegSetValueExA(hkey, "", 0, REG_SZ, (LPBYTE)CLASS_SHDOCVW, sizeof(CLASS_SHDOCVW)); 360 RegSetValueExA(hkey, COM_THREADMODEL, 0, REG_SZ, (LPBYTE)COM_THREAD_APARTMENT, sizeof(COM_THREAD_APARTMENT)); 361 RegCloseKey(hkey); 362 363 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Classes\\CLSID\\{8856f961-340a-11d0-a96b-00c04fd705a2}\\shellex\\MayChangeDefaultMenu",&hkey)!=ERROR_SUCCESS) { 364 goto initreg_error; 365 } 366 RegSetValueExA(hkey, "", 0, REG_SZ, (LPBYTE)"", 1); 337 367 RegCloseKey(hkey); 338 368 -
trunk/src/kernel32/mmap.cpp
r4802 r4946 1 /* $Id: mmap.cpp,v 1.4 7 2000-12-16 18:37:26sandervl Exp $ */1 /* $Id: mmap.cpp,v 1.48 2001-01-14 17:16:55 sandervl Exp $ */ 2 2 3 3 /* … … 19 19 * TODO: Suspend all threads when a page is committed (possible that another thread 20 20 * accesses the same memory before the page is read from disk 21 * TODO: File maps for new files (must select an initial size)! 21 22 * 22 23 * Project Odin Software License can be found in LICENSE.TXT -
trunk/src/kernel32/wprocess.cpp
r4682 r4946 1 /* $Id: wprocess.cpp,v 1.11 0 2000-11-23 19:23:51sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.111 2001-01-14 17:16:55 sandervl Exp $ */ 2 2 3 3 /* … … 1568 1568 sprintf(cmdline, "%s", lpCommandLine); 1569 1569 } 1570 1570 1571 char szAppName[255]; 1572 DWORD fileAttr; 1571 1573 char *exename = szAppName; 1572 1574 strncpy(szAppName, cmdline, sizeof(szAppName)); … … 1576 1578 while(*exename != 0 && *exename != '"') 1577 1579 exename++; 1580 1581 if(*exename != 0) { 1582 *exename = 0; 1583 } 1584 exename = &szAppName[1]; 1578 1585 } 1579 1586 else { 1587 BOOL fTerminate = FALSE; 1588 DWORD fileAttr; 1589 1580 1590 //TODO: doesn't work for directories with spaces! 1581 while(*exename != 0 && *exename != ' ' && *exename != '"') 1582 exename++; 1583 } 1584 if(*exename != 0) { 1585 *exename = 0; 1586 } 1587 if(szAppName[0] == '"') { 1588 exename = &szAppName[1]; 1589 } 1590 else exename = szAppName; 1591 1592 if(GetFileAttributesA(exename) == -1) { 1591 while(*exename != 0) { 1592 while(*exename != 0 && *exename != ' ') 1593 exename++; 1594 1595 if(*exename != 0) { 1596 *exename = 0; 1597 fTerminate = TRUE; 1598 } 1599 1600 fileAttr = GetFileAttributesA(szAppName); 1601 if(fileAttr != -1 && !(fileAttr & FILE_ATTRIBUTE_DIRECTORY)) { 1602 break; 1603 } 1604 if(fTerminate) { 1605 *exename = ' '; 1606 exename++; 1607 fTerminate = FALSE; 1608 } 1609 } 1610 exename = szAppName; 1611 } 1612 fileAttr = GetFileAttributesA(exename); 1613 if(fileAttr == -1 || (fileAttr & FILE_ATTRIBUTE_DIRECTORY)) { 1593 1614 dprintf(("CreateProcess: can't find executable!")); 1594 1615 SetLastError(ERROR_FILE_NOT_FOUND); 1595 1616 return FALSE; 1596 1617 } 1618 1597 1619 dprintf(("KERNEL32: CreateProcess %s\n", cmdline)); 1598 1620
Note:
See TracChangeset
for help on using the changeset viewer.