Changeset 16309
- Timestamp:
- May 19, 2001, 1:13:05 PM (24 years ago)
- Location:
- tags/trunk/src/advapi32
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/advapi32/ADVAPI32.DEF ¶
r16155 r16309 1 ; $Id: ADVAPI32.DEF,v 1.1 6 2001-04-26 17:00:33sandervl Exp $1 ; $Id: ADVAPI32.DEF,v 1.17 2001-05-19 11:13:04 sandervl Exp $ 2 2 3 3 ; … … 401 401 StartServiceW = _StartServiceW@12 @364 402 402 ; SynchronizeWindows31FilesAndWindowsNTRegistry @365 403 ; SystemFunction001@366404 ; SystemFunction002@367405 ; SystemFunction003@368406 ; SystemFunction004@369407 ; SystemFunction005@370408 ; SystemFunction006@371409 ; SystemFunction007@372410 ; SystemFunction008@373411 ; SystemFunction009@374412 ; SystemFunction010@375413 ; SystemFunction011@376414 ; SystemFunction012@377415 ; SystemFunction013@378416 ; SystemFunction014@379417 ; SystemFunction015@380418 ; SystemFunction016@381419 ; SystemFunction017@382420 ; SystemFunction018@383421 ; SystemFunction019@384422 ; SystemFunction020@385423 ; SystemFunction021@386424 ; SystemFunction022@387425 ; SystemFunction023@388426 ; SystemFunction024@389427 ; SystemFunction025@390428 ; SystemFunction026@391429 ; SystemFunction027@392430 ; SystemFunction028@393431 ; SystemFunction029@394432 ; SystemFunction030@395433 ; SystemFunction031@396434 ; SystemFunction032@397435 ; SystemFunction033@398403 SystemFunction001 = _SystemFunction001@12 @366 404 SystemFunction002 = _SystemFunction002@12 @367 405 SystemFunction003 = _SystemFunction003@8 @368 406 SystemFunction004 = _SystemFunction004@12 @369 407 SystemFunction005 = _SystemFunction005@12 @370 408 SystemFunction006 = _SystemFunction006@8 @371 409 SystemFunction007 = _SystemFunction007@8 @372 410 SystemFunction008 = _SystemFunction008@12 @373 411 SystemFunction009 = _SystemFunction009@12 @374 412 SystemFunction010 = _SystemFunction010@12 @375 413 SystemFunction011 = _SystemFunction011@12 @376 414 SystemFunction012 = _SystemFunction012@12 @377 415 SystemFunction013 = _SystemFunction013@12 @378 416 SystemFunction014 = _SystemFunction014@12 @379 417 SystemFunction015 = _SystemFunction015@12 @380 418 SystemFunction016 = _SystemFunction016@12 @381 419 SystemFunction017 = _SystemFunction017@12 @382 420 SystemFunction018 = _SystemFunction018@12 @383 421 SystemFunction019 = _SystemFunction019@12 @384 422 SystemFunction020 = _SystemFunction020@12 @385 423 SystemFunction021 = _SystemFunction021@12 @386 424 SystemFunction022 = _SystemFunction022@12 @387 425 SystemFunction023 = _SystemFunction023@12 @388 426 SystemFunction024 = _SystemFunction024@12 @389 427 SystemFunction025 = _SystemFunction025@12 @390 428 SystemFunction026 = _SystemFunction026@12 @391 429 SystemFunction027 = _SystemFunction027@12 @392 430 SystemFunction028 = _SystemFunction028@8 @393 431 SystemFunction029 = _SystemFunction029@8 @394 432 SystemFunction030 = _SystemFunction030@8 @395 433 SystemFunction031 = _SystemFunction031@8 @396 434 SystemFunction032 = _SystemFunction032@8 @397 435 SystemFunction033 = _SystemFunction033@8 @398 436 436 ; TrusteeAccessToObjectA @399 437 437 ; TrusteeAccessToObjectW @400 -
TabularUnified tags/trunk/src/advapi32/makefile ¶
r15284 r16309 1 # $Id: makefile,v 1.2 7 2000-12-02 23:36:27 birdExp $1 # $Id: makefile,v 1.28 2001-05-19 11:13:04 sandervl Exp $ 2 2 3 3 # … … 22 22 $(OBJDIR)\lsa.obj \ 23 23 $(OBJDIR)\security.obj \ 24 $(OBJDIR)\systemfunction.obj \ 24 25 $(OBJDIR)\service.obj \ 25 26 $(OBJDIR)\eventlog.obj \ -
TabularUnified tags/trunk/src/advapi32/service.cpp ¶
r12926 r16309 1 /* $Id: service.cpp,v 1. 5 2000-01-06 20:05:00sandervl Exp $ */1 /* $Id: service.cpp,v 1.6 2001-05-19 11:13:05 sandervl Exp $ */ 2 2 3 3 /* … … 62 62 //This key exists if DeleteService has been called for a specific service 63 63 #define REG_SERVICE_DELETEPENDING "DeletePending" 64 //TODO: How can you query the name of a key from the key handle???? 65 #define REG_SERVICE_NAME "ServiceName" 64 66 65 67 //Win32 service can call StartServiceCtrlDispatcherA/W only once … … 589 591 DWORD deletepending, keytype = REG_DWORD, size = sizeof(DWORD); 590 592 if(!RegQueryValueExA((HKEY)hSCObject, REG_SERVICE_DELETEPENDING, 0, &keytype, (LPBYTE)&deletepending, &size)) { 591 FILETIME filetime; 592 DWORD bla, classsize; 593 CHAR szClassName[64]; 593 CHAR szKeyName[256] = ""; 594 594 595 595 HKEY keyServices; … … 598 598 return FALSE; 599 599 } 600 601 //NOTE: Assumes for now there are no subkeys 602 //TODO: DOes not work 603 classsize = sizeof(szClassName); 604 RegQueryValueA((HKEY)hSCObject, NULL, szClassName, (LPLONG)&classsize); 600 keytype = REG_SZ; 601 size = sizeof(szKeyName); 602 RegQueryValueExA(hSCObject, REG_SERVICE_NAME, 0, &keytype, (LPBYTE)szKeyName, &size); 603 605 604 RegCloseKey((HKEY)hSCObject); 606 RegDeleteKeyA(keyServices, szClassName); 605 RegDeleteKeyA(keyServices, szKeyName); 606 RegCloseKey((HKEY)keyServices); 607 607 } 608 608 … … 715 715 return 0; 716 716 } 717 RegSetValueExA(keyThisService, REG_SERVICE_NAME, 0, REG_SZ, (LPBYTE)lpServiceName, strlen(lpServiceName)+1); 717 718 RegSetValueExA(keyThisService, REG_SERVICE_TYPE, 0, REG_DWORD, (LPBYTE)&dwServiceType, sizeof(DWORD)); 718 719 RegSetValueExA(keyThisService, REG_SERVICE_STARTTYPE, 0, REG_DWORD, (LPBYTE)&dwStartType, sizeof(DWORD)); … … 1183 1184 lpResumeHandle)); 1184 1185 1186 SetLastError (ERROR_ACCESS_DENIED); 1185 1187 return (FALSE); /* signal failure */ 1186 1188 } … … 1226 1228 lpResumeHandle)); 1227 1229 1230 SetLastError (ERROR_ACCESS_DENIED); 1228 1231 return (FALSE); /* signal failure */ 1229 1232 }
Note:
See TracChangeset
for help on using the changeset viewer.