source: trunk/src/kernel32/wprocess.cpp@ 966

Last change on this file since 966 was 966, checked in by sandervl, 26 years ago

GetModuleHandleA fix

File size: 21.4 KB
Line 
1/* $Id: wprocess.cpp,v 1.32 1999-09-18 12:07:35 sandervl Exp $ */
2
3/*
4 * Win32 process functions
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <stdio.h>
14#include <stdlib.h>
15#include <string.h>
16
17#include <unicode.h>
18#include <windllbase.h>
19#include <winexebase.h>
20#include <windllpeldr.h>
21
22#ifdef __IBMCPP__
23#include <builtin.h>
24#endif
25
26#include "exceptutil.h"
27#include "oslibmisc.h"
28
29#include "console.h"
30#include "cio.h"
31#include "versionos2.h" /*PLF Wed 98-03-18 02:36:51*/
32#include <wprocess.h>
33#include "mmap.h"
34
35BOOL fFreeLibrary = FALSE;
36
37//Process database
38PDB ProcessPDB = {0};
39USHORT ProcessTIBSel = 0;
40DWORD *TIBFlatPtr = 0;
41
42extern "C" ULONG QueryExceptionChain();
43
44
45//******************************************************************************
46//******************************************************************************
47TEB *WIN32API GetThreadTEB()
48{
49 return (TEB *)*TIBFlatPtr;
50}
51//******************************************************************************
52//******************************************************************************
53THDB *WIN32API GetThreadTHDB()
54{
55 TEB *winteb;
56 THDB *thdb;
57
58 winteb = (TEB *)*TIBFlatPtr;
59 if(winteb == NULL) {
60 return NULL;
61 }
62 thdb = (THDB *)(winteb+1);
63
64 return thdb;
65}
66//******************************************************************************
67// Set up the TIB selector and memory for the current thread
68//******************************************************************************
69TEB *InitializeTIB(BOOL fMainThread)
70{
71 TEB *winteb;
72 THDB *thdb;
73
74 USHORT tibsel;
75
76 //Allocate one dword to store the flat address of our TEB
77 TIBFlatPtr = (DWORD *)OSLibAllocThreadLocalMemory(1);
78 if(TIBFlatPtr == 0) {
79 dprintf(("InitializeTIB: local thread memory alloc failed!!"));
80 DebugInt3();
81 return NULL;
82 }
83 if(OSLibAllocSel(PAGE_SIZE, &tibsel) == FALSE)
84 {
85 dprintf(("InitializeTIB: selector alloc failed!!"));
86 DebugInt3();
87 return NULL;
88 }
89 winteb = (TEB *)OSLibSelToFlat(tibsel);
90 if(winteb == NULL)
91 {
92 dprintf(("InitializeTIB: DosSelToFlat failed!!"));
93 DebugInt3();
94 return NULL;
95 }
96 memset(winteb, 0, PAGE_SIZE);
97 thdb = (THDB *)(winteb+1);
98 *TIBFlatPtr = (DWORD)winteb;
99
100 winteb->except = (PVOID)-1; /* 00 Head of exception handling chain */
101 winteb->stack_top = (PVOID)OSLibGetTIB(TIB_STACKTOP); /* 04 Top of thread stack */
102 winteb->stack_low = (PVOID)OSLibGetTIB(TIB_STACKLOW); /* 08 Stack low-water mark */
103 winteb->htask16 = (USHORT)OSLibGetPIB(PIB_TASKHNDL); /* 0c Win16 task handle */
104 winteb->stack_sel = getSS(); /* 0e 16-bit stack selector */
105 winteb->self = winteb; /* 18 Pointer to this structure */
106 winteb->flags = TEBF_WIN32; /* 1c Flags */
107 winteb->queue = 0; /* 28 Message queue */
108 winteb->tls_ptr = &thdb->tls_array[0]; /* 2c Pointer to TLS array */
109 winteb->process = &ProcessPDB; /* 30 owning process (used by NT3.51 applets)*/
110
111 memcpy(&thdb->teb, winteb, sizeof(TEB));
112 thdb->process = &ProcessPDB;
113 thdb->exit_code = 0x103; /* STILL_ACTIVE */
114 thdb->teb_sel = tibsel;
115 thdb->OrgTIBSel = GetFS();
116
117 if(OSLibGetPIB(PIB_TASKTYPE) == TASKTYPE_PM)
118 {
119 thdb->flags = 0; //todo gui
120 }
121 else thdb->flags = 0; //todo textmode
122
123 if(fMainThread)
124 {
125 //todo initialize PDB during process creation
126 //todo: initialize TLS array if required
127 //TLS in executable always TLS index 0?
128 ProcessTIBSel = tibsel;
129 }
130 dprintf(("InitializeTIB setup TEB with selector %x", tibsel));
131 dprintf(("InitializeTIB: FS(%x):[0] = %x", GetFS(), QueryExceptionChain()));
132 return winteb;
133}
134//******************************************************************************
135// Destroy the TIB selector and memory for the current thread
136//******************************************************************************
137void DestroyTIB()
138{
139 SHORT orgtibsel;
140 TEB *winteb;
141 THDB *thdb;
142
143 dprintf(("DestroyTIB: FS = %x", GetFS()));
144 dprintf(("DestroyTIB: FS:[0] = %x", QueryExceptionChain()));
145
146 winteb = (TEB *)*TIBFlatPtr;
147 if(winteb) {
148 thdb = (THDB *)(winteb+1);
149 orgtibsel = thdb->OrgTIBSel;
150
151 //Restore our original FS selector
152 SetFS(orgtibsel);
153
154 //And free our own
155 OSLibFreeSel(thdb->teb_sel);
156 }
157 else dprintf(("Already destroyed TIB"));
158
159 dprintf(("DestroyTIB: FS(%x):[0] = %x", GetFS(), QueryExceptionChain()));
160 *TIBFlatPtr = 0;
161 return;
162}
163/******************************************************************************/
164/******************************************************************************/
165void WIN32API RestoreOS2TIB()
166{
167 SHORT orgtibsel;
168 TEB *winteb;
169 THDB *thdb;
170
171 winteb = (TEB *)*TIBFlatPtr;
172 if(winteb) {
173 thdb = (THDB *)(winteb+1);
174 orgtibsel = thdb->OrgTIBSel;
175
176 //Restore our original FS selector
177 SetFS(orgtibsel);
178 }
179}
180/******************************************************************************/
181/******************************************************************************/
182USHORT WIN32API SetWin32TIB()
183{
184 SHORT win32tibsel;
185 TEB *winteb;
186 THDB *thdb;
187
188 winteb = (TEB *)*TIBFlatPtr;
189 if(winteb) {
190 thdb = (THDB *)(winteb+1);
191 win32tibsel = thdb->teb_sel;
192
193 //Restore our win32 FS selector
194 return SetReturnFS(win32tibsel);
195 }
196 // nested calls are OK, OS2ToWinCallback for instance
197 //else DebugInt3();
198
199 return GetFS();
200}
201//******************************************************************************
202//******************************************************************************
203void _System Win32DllExitList(ULONG reason)
204{
205 dprintf(("Win32DllExitList %d\n", reason));
206
207 if(WinExe) {
208 delete(WinExe);
209 WinExe = NULL;
210 }
211 return;
212}
213//******************************************************************************
214//******************************************************************************
215VOID WIN32API ExitProcess(DWORD exitcode)
216{
217 dprintf(("KERNEL32: ExitProcess %d\n", exitcode));
218 dprintf(("KERNEL32: ExitProcess FS = %x\n", GetFS()));
219
220 SetOS2ExceptionChain(-1);
221
222 //Flush and delete all open memory mapped files
223 Win32MemMap::deleteAll();
224
225 Win32DllExitList(0);
226
227 //Restore original OS/2 TIB selector
228 DestroyTIB();
229 SetExceptionChain((ULONG)-1);
230
231 //avoid crashes since win32 & OS/2 exception handler aren't identical
232 //(terminate process generates two exceptions)
233 /* @@@PH 1998/02/12 Added Console Support */
234 if (iConsoleIsActive())
235 iConsoleWaitClose();
236
237 O32_ExitProcess(exitcode);
238}
239//******************************************************************************
240//******************************************************************************
241BOOL WIN32API FreeLibrary(HINSTANCE hinstance)
242{
243 Win32DllBase *winmod;
244 BOOL rc;
245
246 dprintf(("FreeLibrary"));
247 winmod = Win32DllBase::findModule(hinstance);
248 if(winmod) {
249 winmod->Release();
250 return(TRUE);
251 }
252 dprintf(("KERNEL32: FreeLibrary %s %X\n", OSLibGetDllName(hinstance), hinstance));
253
254 //TODO: Not thread safe
255 fFreeLibrary = TRUE; //ditch dll
256 rc = O32_FreeLibrary(hinstance);
257 fFreeLibrary = FALSE;
258 dprintf(("FreeLibrary returned %X\n", rc));
259 return(TRUE);
260}
261/******************************************************************************/
262/******************************************************************************/
263static HINSTANCE iLoadLibraryA(LPCTSTR lpszLibFile, DWORD dwFlags)
264{
265 char modname[CCHMAXPATH];
266 HINSTANCE hDll;
267 Win32DllBase *module;
268
269 hDll = O32_LoadLibrary(lpszLibFile);
270 dprintf(("KERNEL32: iLoadLibraryA %s returned %X (%d)\n",
271 lpszLibFile,
272 hDll,
273 GetLastError()));
274 if(hDll)
275 {
276 return hDll; //converted dll or win32k took care of it
277 }
278
279 strcpy(modname, lpszLibFile);
280 strupr(modname);
281 if(!strstr(modname, ".DLL")) {
282 strcat(modname,".DLL");
283 }
284
285 if(Win32ImageBase::isPEImage((char *)modname))
286 {
287 module = Win32DllBase::findModule((char *)modname);
288 if(module) {//don't load it again
289 module->AddRef();
290 return module->getInstanceHandle();
291 }
292
293 Win32PeLdrDll *peldrDll = new Win32PeLdrDll((char *)modname);
294 if(peldrDll == NULL)
295 return(0);
296
297 peldrDll->init(0);
298 if(peldrDll->getError() != NO_ERROR) {
299 dprintf(("LoadLibary %s failed (::init)\n", lpszLibFile));
300 delete(peldrDll);
301 return(0);
302 }
303 if(dwFlags & DONT_RESOLVE_DLL_REFERENCES) {
304 peldrDll->setNoEntryCalls();
305 }
306
307 if(peldrDll->attachProcess() == FALSE) {
308 dprintf(("LoadLibary %s failed (::attachProcess)\n", lpszLibFile));
309 delete(peldrDll);
310 return(0);
311 }
312 peldrDll->AddRef();
313 return peldrDll->getInstanceHandle();
314 }
315 else return(0);
316}
317//******************************************************************************
318//******************************************************************************
319HINSTANCE WIN32API LoadLibraryA(LPCTSTR lpszLibFile)
320{
321 HINSTANCE hDll;
322
323 dprintf(("KERNEL32: LoadLibraryA(%s)\n",
324 lpszLibFile));
325
326 hDll = iLoadLibraryA(lpszLibFile, 0);
327 if (hDll == 0)
328 {
329 char * pszName;
330
331 // remove path from the image name
332 pszName = strrchr((char *)lpszLibFile,
333 '\\');
334 if (pszName != NULL)
335 {
336 pszName++; // skip backslash
337
338 // now try again without fully qualified path
339 hDll = iLoadLibraryA(pszName, 0);
340 }
341 }
342
343 return hDll;
344}
345//******************************************************************************
346//******************************************************************************
347HINSTANCE WIN32API LoadLibraryExA(LPCTSTR lpszLibFile, HANDLE hFile, DWORD dwFlags)
348{
349 HINSTANCE hDll;
350
351 dprintf(("KERNEL32: LoadLibraryExA %s (%X)\n", lpszLibFile, dwFlags));
352 hDll = iLoadLibraryA(lpszLibFile, dwFlags);
353 if (hDll == 0)
354 {
355 char * pszName;
356
357 // remove path from the image name
358 pszName = strrchr((char *)lpszLibFile,
359 '\\');
360 if (pszName != NULL)
361 {
362 pszName++; // skip backslash
363
364 // now try again without fully qualified path
365 hDll = iLoadLibraryA(pszName, dwFlags);
366 }
367 }
368
369 return hDll;
370}
371//******************************************************************************
372//******************************************************************************
373HINSTANCE WIN32API LoadLibraryW(LPCWSTR lpModule)
374{
375 char *asciimodule;
376 HINSTANCE rc;
377
378 asciimodule = UnicodeToAsciiString((LPWSTR)lpModule);
379 dprintf(("KERNEL32: OS2LoadLibraryW %s\n", asciimodule));
380 rc = LoadLibraryA(asciimodule);
381 free(asciimodule);
382 return(rc);
383}
384//******************************************************************************
385//******************************************************************************
386HINSTANCE WIN32API LoadLibraryExW(LPCWSTR lpModule, HANDLE hFile, DWORD dwFlags)
387{
388 char *asciimodule;
389 HINSTANCE rc;
390
391 asciimodule = UnicodeToAsciiString((LPWSTR)lpModule);
392 dprintf(("KERNEL32: OS2LoadLibraryExW %s (%d)\n", asciimodule, dwFlags));
393 rc = LoadLibraryExA(asciimodule, hFile, dwFlags);
394 free(asciimodule);
395 return(rc);
396}
397//******************************************************************************
398//******************************************************************************
399LPCSTR WIN32API GetCommandLineA()
400{
401 LPTSTR cmdline = NULL;
402
403 if(WinExe) {
404 cmdline = WinExe->getCommandLine();
405 }
406 if(cmdline == NULL) //not used for converted exes
407 cmdline = O32_GetCommandLine();
408
409 dprintf(("KERNEL32: GetCommandLine %s\n", cmdline));
410 dprintf(("KERNEL32: FS = %x\n", GetFS()));
411 return(cmdline);
412}
413//******************************************************************************
414//******************************************************************************
415LPCWSTR WIN32API GetCommandLineW(void)
416{
417 static WCHAR *UnicodeCmdLine = NULL;
418 char *asciicmdline = NULL;
419
420 dprintf(("KERNEL32: FS = %x\n", GetFS()));
421
422 if(UnicodeCmdLine)
423 return(UnicodeCmdLine); //already called before
424
425 if(WinExe) {
426 asciicmdline = WinExe->getCommandLine();
427 }
428 if(asciicmdline == NULL) //not used for converted exes
429 asciicmdline = O32_GetCommandLine();
430
431 if(asciicmdline) {
432 UnicodeCmdLine = (WCHAR *)malloc(strlen(asciicmdline)*2 + 2);
433 AsciiToUnicode(asciicmdline, UnicodeCmdLine);
434 dprintf(("KERNEL32: OS2GetCommandLineW: %s\n", asciicmdline));
435 return(UnicodeCmdLine);
436 }
437 dprintf(("KERNEL32: OS2GetCommandLineW: asciicmdline == NULL\n"));
438 return NULL;
439}
440//******************************************************************************
441//******************************************************************************
442DWORD WIN32API GetModuleFileNameA(HMODULE hinstModule, LPTSTR lpszPath, DWORD cchPath)
443{
444 DWORD rc;
445 Win32ImageBase *module;
446 char *fpath = NULL;
447
448 dprintf(("GetModuleFileName %X", hinstModule));
449 if(hinstModule == 0 || hinstModule == -1 || (WinExe && hinstModule == WinExe->getInstanceHandle())) {
450 module = (Win32ImageBase *)WinExe;
451 }
452 else {
453 module = (Win32ImageBase *)Win32DllBase::findModule(hinstModule);
454 }
455
456 if(module) {
457 fpath = module->getFullPath();
458 }
459 if(fpath) {
460 //SvL: 13-9-98: +1
461 rc = min(strlen(fpath)+1, cchPath);
462 strncpy(lpszPath, fpath, rc);
463 }
464 else rc = O32_GetModuleFileName(hinstModule, lpszPath, cchPath);
465
466 if(rc) {
467 dprintf(("KERNEL32: GetModuleFileName %s %d\n", lpszPath, hinstModule));
468 }
469 return(rc);
470}
471//******************************************************************************
472//******************************************************************************
473DWORD WIN32API GetModuleFileNameW(HMODULE hModule, LPWSTR lpFileName, DWORD nSize)
474{
475 char *asciifilename = (char *)malloc(nSize+1);
476 DWORD rc;
477
478 dprintf(("KERNEL32: OSLibGetModuleFileNameW\n"));
479 rc = GetModuleFileNameA(hModule, asciifilename, nSize);
480 if(rc) AsciiToUnicode(asciifilename, lpFileName);
481 free(asciifilename);
482 return(rc);
483}
484//******************************************************************************
485//NOTE: GetModuleHandleA does NOT support files with multiple dots (i.e.
486// very.weird.exe)
487//******************************************************************************
488HANDLE WIN32API GetModuleHandleA(LPCTSTR lpszModule)
489{
490 HANDLE hMod;
491 Win32DllBase *windll;
492 char szModule[CCHMAXPATH];
493 BOOL fDllModule = FALSE;
494
495 if(lpszModule == NULL) {
496 if(WinExe)
497 hMod = WinExe->getInstanceHandle();
498 else hMod = -1;
499 }
500 else {
501 strcpy(szModule, OSLibStripPath((char *)lpszModule));
502 strupr(szModule);
503 if(strstr(szModule, ".DLL")) {
504 fDllModule = TRUE;
505 }
506 else {
507 if(!strstr(szModule, ".")) {
508 //if there's no extension or trainling dot, we
509 //assume it's a dll (see Win32 SDK docs)
510 fDllModule = TRUE;
511 }
512 }
513 char *dot = strstr(szModule, ".");
514 if(dot)
515 *dot = 0;
516
517 if(!fDllModule && WinExe && !strcmpi(lpszModule, WinExe->getModuleName())) {
518 hMod = WinExe->getInstanceHandle();
519 }
520 else {
521 windll = Win32DllBase::findModule(szModule);
522 if(windll) {
523 hMod = windll->getInstanceHandle();
524 }
525 else hMod = OSLibiGetModuleHandleA((char *)lpszModule);
526 }
527 }
528
529 eprintf(("KERNEL32: GetModuleHandle %s returned %X\n", lpszModule, hMod));
530 return(hMod);
531}
532//******************************************************************************
533//******************************************************************************
534HMODULE WIN32API GetModuleHandleW(LPCWSTR arg1)
535{
536 HMODULE rc;
537 char *astring;
538
539 astring = UnicodeToAsciiString((LPWSTR)arg1);
540 rc = GetModuleHandleA(astring);
541 dprintf(("KERNEL32: OS2GetModuleHandleW %s returned %X\n", astring, rc));
542 FreeAsciiString(astring);
543 return(rc);
544}
545//******************************************************************************
546//******************************************************************************
547BOOL WIN32API CreateProcessA(LPCSTR lpszImageName, LPSTR lpszCommandLine,
548 PSECURITY_ATTRIBUTES arg3,
549 PSECURITY_ATTRIBUTES arg4, BOOL arg5, DWORD arg6,
550 PVOID arg7, LPCSTR arg8, LPSTARTUPINFOA arg9,
551 LPPROCESS_INFORMATION arg10)
552{
553 BOOL rc;
554 char *cmdline;
555 BOOL fAllocStr = FALSE;
556
557 if(O32_CreateProcess(lpszImageName, lpszCommandLine, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) == TRUE)
558 return(TRUE);
559
560 //probably a win32 exe, so run it in the pe loader
561 if(lpszImageName) {
562 if(lpszCommandLine) {
563 cmdline = (char *)malloc(strlen(lpszImageName)+strlen(lpszCommandLine) + 16);
564 sprintf(cmdline, "%s %s", lpszImageName, lpszCommandLine);
565 fAllocStr = TRUE;
566 }
567 else cmdline = (char *)lpszImageName;
568 }
569 else cmdline = (char *)lpszCommandLine;
570
571 dprintf(("KERNEL32: CreateProcess %s\n", cmdline));
572 rc = O32_CreateProcess("PE.EXE", (LPCSTR)cmdline, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
573 if(fAllocStr)
574 free(cmdline);
575
576 dprintf(("KERNEL32: CreateProcess returned %d\n", rc));
577 return(rc);
578}
579//******************************************************************************
580//******************************************************************************
581BOOL WIN32API CreateProcessW(LPCWSTR arg1, LPWSTR arg2,
582 PSECURITY_ATTRIBUTES arg3,
583 PSECURITY_ATTRIBUTES arg4,
584 BOOL arg5, DWORD arg6, PVOID arg7,
585 LPCWSTR arg8, LPSTARTUPINFOW arg9,
586 LPPROCESS_INFORMATION arg10)
587{
588 BOOL rc;
589 char *astring1, *astring2, *astring3;
590
591 dprintf(("KERNEL32: OS2CreateProcessW DOESN't WORK"));
592 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
593 astring2 = UnicodeToAsciiString(arg2);
594 astring3 = UnicodeToAsciiString((LPWSTR)arg8);
595 // NOTE: This will not work as is (needs UNICODE support)
596 rc = CreateProcessA(astring1, astring2, arg3, arg4, arg5, arg6, arg7,
597 astring3, (LPSTARTUPINFOA)arg9, arg10);
598 FreeAsciiString(astring3);
599 FreeAsciiString(astring2);
600 FreeAsciiString(astring1);
601 return(rc);
602}
603//******************************************************************************
604//******************************************************************************
605FARPROC WIN32API GetProcAddress(HMODULE hModule, LPCSTR lpszProc)
606{
607 Win32DllBase *winmod;
608 FARPROC proc;
609 ULONG ulAPIOrdinal;
610
611 winmod = Win32DllBase::findModule((HINSTANCE)hModule);
612 if(winmod) {
613 ulAPIOrdinal = (ULONG)lpszProc;
614 if (ulAPIOrdinal <= 0x0000FFFF) {
615 proc = (FARPROC)winmod->getApi((int)ulAPIOrdinal);
616 }
617 else proc = (FARPROC)winmod->getApi((char *)lpszProc);
618 if(proc == 0) {
619 SetLastError(ERROR_PROC_NOT_FOUND);
620 }
621 return proc;
622 }
623 proc = O32_GetProcAddress(hModule, lpszProc);
624 dprintf(("KERNEL32: GetProcAddress %s from %X returned %X\n", lpszProc, hModule, proc));
625 return(proc);
626}
627//******************************************************************************
628//Retrieve the version
629//******************************************************************************
630BOOL SYSTEM GetVersionStruct(char *modname, char *verstruct, ULONG bufLength)
631{
632 HINSTANCE hinstance;
633 Win32ImageBase *winimage;
634
635 dprintf(("GetVersionStruct"));
636 hinstance = OSLibQueryModuleHandle(modname);
637 if(hinstance == 0) {
638 dprintf(("GetVersionStruct can't find handle for %s\n", modname));
639 return(FALSE);
640 }
641 if(WinExe && WinExe->getInstanceHandle() == hinstance) {
642 winimage = (Win32ImageBase *)WinExe;
643 }
644 else {
645 winimage = (Win32ImageBase *)Win32DllBase::findModule(hinstance);
646 if(winimage == NULL) {
647 dprintf(("GetVersionStruct can't find Win32Image for %s\n", modname));
648 return(FALSE);
649 }
650 }
651 return winimage->getVersionStruct(verstruct, bufLength);
652}
653//******************************************************************************
654//******************************************************************************
655ULONG SYSTEM GetVersionSize(char *modname)
656{
657 HINSTANCE hinstance;
658 Win32ImageBase *winimage;
659
660 dprintf(("GetVersionSize of %s\n", modname));
661 hinstance = OSLibQueryModuleHandle(modname);
662 if(hinstance == 0) {
663 dprintf(("GetVersionSize can't find handle for %s\n", modname));
664 return(FALSE);
665 }
666
667 if(WinExe && WinExe->getInstanceHandle() == hinstance) {
668 winimage = (Win32ImageBase *)WinExe;
669 }
670 else {
671 winimage = (Win32ImageBase *)Win32DllBase::findModule(hinstance);
672 if(winimage == NULL) {
673 dprintf(("GetVersionSize can't find Win32Image for %s\n", modname));
674 return(FALSE);
675 }
676 }
677 return winimage->getVersionSize();
678}
679//******************************************************************************
680//******************************************************************************
681
682
683/***********************************************************************
684 * RegisterServiceProcess (KERNEL, KERNEL32)
685 *
686 * A service process calls this function to ensure that it continues to run
687 * even after a user logged off.
688 */
689DWORD WIN32API RegisterServiceProcess(DWORD dwProcessId,
690 DWORD dwType)
691{
692 dprintf(("KERNEL32: RegisterServiceProcess(%08xh,%08xh) not implemented.\n",
693 dwProcessId,
694 dwType));
695
696 /* I don't think that Wine needs to do anything in that function */
697 return 1; /* success */
698}
699
Note: See TracBrowser for help on using the repository browser.