Changeset 2343
- Timestamp:
- Jan 6, 2000, 9:05:00 PM (25 years ago)
- Location:
- trunk/src/advapi32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/advapi32/ADVAPI32.CPP ¶
r2172 r2343 1 /* $Id: ADVAPI32.CPP,v 1.1 2 1999-12-21 00:35:28sandervl Exp $ */1 /* $Id: ADVAPI32.CPP,v 1.13 2000-01-06 20:04:59 sandervl Exp $ */ 2 2 3 3 /* … … 955 955 } 956 956 957 958 959 /*****************************************************************************960 * Name : InitializeAcl961 * Purpose : The InitializeAcl function creates a new ACL structure.962 * An ACL is an access-control list.963 * Parameters: PACL pAcl address of access-control list964 * DWORD nAclLength size of access-control list965 * DWORD dwAclRevision revision level of access-control list966 * Variables :967 * Result :968 * Remark :969 * Status : UNTESTED STUB970 *971 * Author : Patrick Haller [Tue, 1998/06/16 23:00]972 *****************************************************************************/973 974 BOOL WIN32API InitializeAcl(PACL pAcl,975 DWORD nAclLength,976 DWORD dwAclRevision)977 {978 dprintf(("ADVAPI32: InitializeAcl(%08xh,%08xh,%08xh) not implemented.\n",979 pAcl,980 nAclLength,981 dwAclRevision));982 983 return (FALSE); /* signal failure */984 }985 986 987 988 957 /***************************************************************************** 989 958 * Name : InitiateSystemShutdownA … … 1843 1812 } 1844 1813 1845 1846 1847 1848 /*****************************************************************************1849 * Name : RegisterServiceCtrlHandlerA1850 * Purpose : The RegisterServiceCtrlHandler function registers a function to1851 * handle service control requests for a service.1852 * Parameters: LPCSTR lpszServiceName address of name of service1853 * LPHANDLER_FUNCTION lpHandlerProc address of handler function1854 * Variables :1855 * Result :1856 * Remark :1857 * Status : UNTESTED STUB1858 *1859 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1860 *****************************************************************************/1861 1862 #define SERVICE_STATUS_HANDLE DWORD1863 #define LPHANDLER_FUNCTION LPVOID1864 SERVICE_STATUS_HANDLE WIN32API RegisterServiceCtrlHandlerA(LPCSTR lpszServiceName,1865 LPHANDLER_FUNCTION lpHandlerProc)1866 {1867 dprintf(("ADVAPI32: RegisterServiceCtrlHandlerA(%s,%08xh) not implemented.\n",1868 lpszServiceName,1869 lpHandlerProc));1870 1871 return (0); /* signal failure */1872 }1873 1874 1875 /*****************************************************************************1876 * Name : RegisterServiceCtrlHandlerW1877 * Purpose : The RegisterServiceCtrlHandler function registers a function to1878 * handle service control requests for a service.1879 * Parameters: LPCWSTR lpszServiceName address of name of service1880 * LPHANDLER_FUNCTION lpHandlerProc address of handler function1881 * Variables :1882 * Result :1883 * Remark :1884 * Status : UNTESTED STUB1885 *1886 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1887 *****************************************************************************/1888 1889 SERVICE_STATUS_HANDLE WIN32API RegisterServiceCtrlHandlerW(LPCWSTR lpszServiceName,1890 LPHANDLER_FUNCTION lpHandlerProc)1891 {1892 dprintf(("ADVAPI32: RegisterServiceCtrlHandlerW(%s,%08xh) not implemented.\n",1893 lpszServiceName,1894 lpHandlerProc));1895 1896 return (0); /* signal failure */1897 }1898 1899 1900 1901 1814 /***************************************************************************** 1902 1815 * Name : SetAclInformation … … 1993 1906 1994 1907 1995 /***************************************************************************** 1996 * Name : SetServiceBits 1997 * Purpose : The SetServiceBits function registers a service's service type 1998 * with the Service Control Manager and the Server service. The 1999 * Server service can then announce the registered service type 2000 * as one it currently supports. The LAN Manager functions 2001 * NetServerGetInfo and NetServerEnum obtain a specified machine's 2002 * supported service types. 2003 * A service type is represented as a set of bit flags; the 2004 * SetServiceBits function sets or clears combinations of those bit flags. 2005 * Parameters: SERVICE_STATUS_HANDLE hServiceStatus service status handle 2006 * DWORD dwServiceBits service type bits to set or clear 2007 * BOOL bSetBitsOn flag to set or clear the service type bits 2008 * BOOL bUpdateImmediately flag to announce server type immediately 2009 * Variables : 2010 * Result : 2011 * Remark : 2012 * Status : UNTESTED STUB 2013 * 2014 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 2015 *****************************************************************************/ 2016 2017 BOOL WIN32API SetServiceBits(SERVICE_STATUS_HANDLE hServiceStatus, 2018 DWORD dwServiceBits, 2019 BOOL bSetBitsOn, 2020 BOOL bUpdateImmediately) 2021 { 2022 dprintf(("ADVAPI32: SetServiceBits(%08xh,%08xh,%08xh,%08xh) not implemented.\n", 2023 hServiceStatus, 2024 dwServiceBits, 2025 bSetBitsOn, 2026 bUpdateImmediately)); 2027 2028 return (FALSE); /* signal failure */ 2029 } 2030 2031 2032 2033 1908 1909 1910 -
TabularUnified trunk/src/advapi32/ADVAPI32.DEF ¶
r2215 r2343 1 ; $Id: ADVAPI32.DEF,v 1.1 0 1999-12-27 18:44:32sandervl Exp $1 ; $Id: ADVAPI32.DEF,v 1.11 2000-01-06 20:05:00 sandervl Exp $ 2 2 3 3 ; … … 7 7 DESCRIPTION 'Odin ADVAPI32.DLL' 8 8 DATA MULTIPLE NONSHARED 9 10 IMPORTS11 _O32_RegCloseKey = PMWINX.54112 _O32_RegCreateKey = PMWINX.54213 _O32_RegCreateKeyEx = PMWINX.54314 _O32_RegDeleteKey = PMWINX.54415 _O32_RegDeleteValue = PMWINX.54516 _O32_RegEnumKey = PMWINX.54617 _O32_RegEnumKeyEx = PMWINX.54718 _O32_RegEnumValue = PMWINX.54819 _O32_RegOpenKey = PMWINX.54920 _O32_RegOpenKeyEx = PMWINX.55021 _O32_RegQueryInfoKey = PMWINX.55122 _O32_RegQueryValue = PMWINX.55223 _O32_RegQueryValueEx = PMWINX.55324 _O32_RegSetValue = PMWINX.55425 _O32_RegSetValueEx = PMWINX.55526 9 27 10 EXPORTS -
TabularUnified trunk/src/advapi32/advapi32.h ¶
r1382 r2343 1 /* $Id: advapi32.h,v 1. 6 1999-10-20 17:18:17 phallerExp $ */1 /* $Id: advapi32.h,v 1.7 2000-01-06 20:05:00 sandervl Exp $ */ 2 2 3 3 /* … … 88 88 LONG ODIN_INTERNAL ODIN_RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD); 89 89 90 #ifdef USE_ODIN_REGISTRY_APIS 91 #define RegConnectRegistryA ODIN_RegConnectRegistryA 92 #define RegConnectRegistryW ODIN_RegConnectRegistryW 93 #define RegEnumKeyExA ODIN_RegEnumKeyExA 94 #define RegEnumKeyExW ODIN_RegEnumKeyExW 95 #define RegGetKeySecurity ODIN_RegGetKeySecurity 96 #define RegLoadKeyA ODIN_RegLoadKeyA 97 #define RegLoadKeyW ODIN_RegLoadKeyW 98 #define RegNotifyChangeKeyValue ODIN_RegNotifyChangeKeyValue 99 #define RegOpenKeyExW ODIN_RegOpenKeyExW 100 #define RegOpenKeyExA ODIN_RegOpenKeyExA 101 #define RegQueryInfoKeyW ODIN_RegQueryInfoKeyW 102 #define RegQueryInfoKeyA ODIN_RegQueryInfoKeyA 103 #define RegReplaceKeyA ODIN_RegReplaceKeyA 104 #define RegReplaceKeyW ODIN_RegReplaceKeyW 105 #define RegRestoreKeyA ODIN_RegRestoreKeyA 106 #define RegRestoreKeyW ODIN_RegRestoreKeyW 107 #define RegUnLoadKeyA ODIN_RegUnLoadKeyA 108 #define RegUnLoadKeyW ODIN_RegUnLoadKeyW 109 #define RegCloseKey ODIN_RegCloseKey 110 #define RegFlushKey ODIN_RegFlushKey 111 #define RegCreateKeyA ODIN_RegCreateKeyA 112 #define RegCreateKeyW ODIN_RegCreateKeyW 113 #define RegDeleteKeyA ODIN_RegDeleteKeyA 114 #define RegDeleteKeyW ODIN_RegDeleteKeyW 115 #define RegDeleteValueA ODIN_RegDeleteValueA 116 #define RegDeleteValueW ODIN_RegDeleteValueW 117 #define RegEnumKeyA ODIN_RegEnumKeyA 118 #define RegEnumKeyW ODIN_RegEnumKeyW 119 #define RegEnumValueA ODIN_RegEnumValueA 120 #define RegEnumValueW ODIN_RegEnumValueW 121 #define RegOpenKeyA ODIN_RegOpenKeyA 122 #define RegOpenKeyW ODIN_RegOpenKeyW 123 #define RegQueryValueA ODIN_RegQueryValueA 124 #define RegQueryValueW ODIN_RegQueryValueW 125 #define RegQueryValueExA ODIN_RegQueryValueExA 126 #define RegQueryValueExW ODIN_RegQueryValueExW 127 #define RegSetValueA ODIN_RegSetValueA 128 #define RegSetValueW ODIN_RegSetValueW 129 #define RegSetValueExA ODIN_RegSetValueExA 130 #define RegSetValueExW ODIN_RegSetValueExW 131 #define RegCreateKeyExA ODIN_RegCreateKeyExA 132 #define RegCreateKeyExW ODIN_RegCreateKeyExW 133 #endif 90 134 91 135 #endif -
TabularUnified trunk/src/advapi32/makefile ¶
r2216 r2343 1 # $Id: makefile,v 1.1 7 1999-12-27 18:44:33sandervl Exp $1 # $Id: makefile,v 1.18 2000-01-06 20:05:00 sandervl Exp $ 2 2 3 3 # … … 30 30 $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \ 31 31 $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/ntdll.lib \ 32 $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)32 $(PDWIN32_LIB)/odincrt.lib $(PDWIN32_LIB)/pmwinx.lib OS2386.LIB $(RTLLIB_O) 33 33 $(CP) $@ $(PDWIN32_BIN) 34 34 -
TabularUnified trunk/src/advapi32/security.cpp ¶
r2133 r2343 1 /* $Id: security.cpp,v 1. 2 1999-12-19 12:24:52sandervl Exp $ */1 /* $Id: security.cpp,v 1.3 2000-01-06 20:05:00 sandervl Exp $ */ 2 2 /* 3 3 * Win32 security API functions for OS/2 … … 102 102 } 103 103 104 /************************************************************************* 105 * SetThreadToken [ADVAPI32.231] 106 * 107 * Assigns an "impersonation token" to a thread so it can assume the 108 * security privledges of another thread or process. Can also remove 109 * a previously assigned token. Only supported on NT - it's a stub 110 * exactly like this one on Win9X. 111 * 112 */ 113 114 BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token) 115 { 116 FIXME(__FUNCTION__"(%p, %x): stub\n", thread, token); 117 118 SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 119 120 return FALSE; 121 } 122 104 123 /****************************************************************************** 105 124 * AdjustTokenPrivileges [ADVAPI32.10] … … 346 365 PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen ) 347 366 { 348 FIXME _(advapi)("(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);367 FIXME(__FUNCTION__"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen); 349 368 return TRUE; 350 369 } … … 356 375 BOOL WINAPI GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor, 357 376 PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision) 358 { FIXME _(advapi)("(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);377 { FIXME(__FUNCTION__"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision); 359 378 return 1; 360 379 } … … 382 401 LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid ) 383 402 { 384 FIXME _(advapi)("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),403 FIXME(__FUNCTION__"(%s,%s,%p): stub\n",debugstr_w(lpSystemName), 385 404 debugstr_w(lpName), lpLuid); 386 405 return TRUE; … … 414 433 DWORD nLength, LPDWORD lpnLengthNeeded ) 415 434 { 416 FIXME _(advapi)("(%s) : stub\n", debugstr_a(lpFileName));435 FIXME(__FUNCTION__"(%s) : stub\n", debugstr_a(lpFileName)); 417 436 return TRUE; 418 437 } … … 438 457 DWORD nLength, LPDWORD lpnLengthNeeded ) 439 458 { 440 FIXME _(advapi)("(%s) : stub\n", debugstr_w(lpFileName) );459 FIXME(__FUNCTION__"(%s) : stub\n", debugstr_w(lpFileName) ); 441 460 return TRUE; 442 461 } 443 462 463 /****************************************************************************** 464 * SetFileSecurity32A [ADVAPI32.182] 465 * Sets the security of a file or directory 466 */ 467 BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName, 468 SECURITY_INFORMATION RequestedInformation, 469 PSECURITY_DESCRIPTOR pSecurityDescriptor) 470 { 471 FIXME(__FUNCTION__"(%s) : stub\n", debugstr_a(lpFileName)); 472 return TRUE; 473 } 474 475 /****************************************************************************** 476 * SetFileSecurity32W [ADVAPI32.183] 477 * Sets the security of a file or directory 478 * 479 * PARAMS 480 * lpFileName [] 481 * RequestedInformation [] 482 * pSecurityDescriptor [] 483 */ 484 BOOL WINAPI 485 SetFileSecurityW( LPCWSTR lpFileName, 486 SECURITY_INFORMATION RequestedInformation, 487 PSECURITY_DESCRIPTOR pSecurityDescriptor ) 488 { 489 FIXME(__FUNCTION__"(%s) : stub\n", debugstr_w(lpFileName) ); 490 return TRUE; 491 } 444 492 445 493 /****************************************************************************** … … 451 499 PSID_NAME_USE name_use ) 452 500 { 453 FIXME _(security)("(%s,%p,%p,%p,%p,%p,%p): stub\n",501 FIXME(__FUNCTION__"(%s,%p,%p,%p,%p,%p,%p): stub\n", 454 502 system,sid,account,accountSize,domain,domainSize,name_use); 455 503 SetLastError(ERROR_CALL_NOT_IMPLEMENTED); … … 474 522 PSID_NAME_USE name_use ) 475 523 { 476 FIXME _(security)("(%p,%p,%p,%p,%p,%p,%p): stub\n",524 FIXME(__FUNCTION__"(%p,%p,%p,%p,%p,%p,%p): stub\n", 477 525 system,sid,account,accountSize,domain,domainSize,name_use); 478 526 SetLastError(ERROR_CALL_NOT_IMPLEMENTED); … … 481 529 482 530 /****************************************************************************** 483 * SetFileSecurity32A [ADVAPI32.182]484 * Sets the security of a file or directory485 */486 BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,487 SECURITY_INFORMATION RequestedInformation,488 PSECURITY_DESCRIPTOR pSecurityDescriptor)489 {490 FIXME_(advapi)("(%s) : stub\n", debugstr_a(lpFileName));491 return TRUE;492 }493 494 /******************************************************************************495 * SetFileSecurity32W [ADVAPI32.183]496 * Sets the security of a file or directory497 *498 * PARAMS499 * lpFileName []500 * RequestedInformation []501 * pSecurityDescriptor []502 */503 BOOL WINAPI504 SetFileSecurityW( LPCWSTR lpFileName,505 SECURITY_INFORMATION RequestedInformation,506 PSECURITY_DESCRIPTOR pSecurityDescriptor )507 {508 FIXME_(advapi)("(%s) : stub\n", debugstr_w(lpFileName) );509 return TRUE;510 }511 512 /******************************************************************************513 531 * QueryWindows31FilesMigration [ADVAPI32.266] 514 532 * … … 519 537 QueryWindows31FilesMigration( DWORD x1 ) 520 538 { 521 FIXME _(advapi)("(%ld):stub\n",x1);539 FIXME(__FUNCTION__"(%ld):stub\n",x1); 522 540 return TRUE; 523 541 } … … 536 554 DWORD x4 ) 537 555 { 538 FIXME _(advapi)("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);556 FIXME(__FUNCTION__"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4); 539 557 return TRUE; 540 558 } … … 555 573 PLSA_HANDLE PolicyHandle) 556 574 { 557 FIXME _(advapi)("(%p,%p,0x%08lx,%p):stub\n",575 FIXME(__FUNCTION__"(%p,%p,0x%08lx,%p):stub\n", 558 576 SystemName, ObjectAttributes, 559 577 DesiredAccess, PolicyHandle); … … 570 588 NotifyBootConfigStatus( DWORD x1 ) 571 589 { 572 FIXME _(advapi)("(0x%08lx):stub\n",x1);590 FIXME(__FUNCTION__"(0x%08lx):stub\n",x1); 573 591 return 1; 574 592 } … … 583 601 RevertToSelf( void ) 584 602 { 585 FIXME _(advapi)("(), stub\n");603 FIXME(__FUNCTION__"(), stub\n"); 586 604 return TRUE; 587 605 } … … 593 611 ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) 594 612 { 595 FIXME _(advapi)("(%08x), stub\n", ImpersonationLevel);613 FIXME(__FUNCTION__"(%08x), stub\n", ImpersonationLevel); 596 614 return TRUE; 597 615 } … … 605 623 LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus) 606 624 { 607 FIXME _(advapi)("(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n",625 FIXME(__FUNCTION__"(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", 608 626 pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, 609 627 PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus); … … 612 630 } 613 631 614 /************************************************************************* 615 * SetThreadToken [ADVAPI32.231] 616 * 617 * Assigns an "impersonation token" to a thread so it can assume the 618 * security privledges of another thread or process. Can also remove 619 * a previously assigned token. Only supported on NT - it's a stub 620 * exactly like this one on Win9X. 621 * 622 */ 623 624 BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token) 625 { 626 FIXME_(advapi)("(%p, %x): stub\n", thread, token); 627 628 SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 629 630 return FALSE; 631 } 632 633 634 635 632 /***************************************************************************** 633 * Name : InitializeAcl 634 * Purpose : The InitializeAcl function creates a new ACL structure. 635 * An ACL is an access-control list. 636 * Parameters: PACL pAcl address of access-control list 637 * DWORD nAclLength size of access-control list 638 * DWORD dwAclRevision revision level of access-control list 639 * Variables : 640 * Result : 641 * Remark : 642 * Status : UNTESTED STUB 643 * 644 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 645 *****************************************************************************/ 646 647 BOOL WIN32API InitializeAcl(PACL pAcl, 648 DWORD nAclLength, 649 DWORD dwAclRevision) 650 { 651 dprintf(("ADVAPI32: InitializeAcl(%08xh,%08xh,%08xh)", 652 pAcl, 653 nAclLength, 654 dwAclRevision)); 655 656 CallWin32ToNt (RtlCreateAcl(pAcl, nAclLength, dwAclRevision)); 657 } -
TabularUnified trunk/src/advapi32/service.cpp ¶
r2173 r2343 1 /* $Id: service.cpp,v 1. 4 1999-12-21 00:35:28sandervl Exp $ */1 /* $Id: service.cpp,v 1.5 2000-01-06 20:05:00 sandervl Exp $ */ 2 2 3 3 /* … … 9 9 * Copyright 1998 Patrick Haller 10 10 * 11 * 12 * TODO: Not done; starting services; control handlers and many other things 13 * TODO: Service status handles are the same as service handles 11 14 * 12 15 * NOTE: Uses registry key for service as handle … … 22 25 #include <odinwrap.h> 23 26 #include <misc.h> 24 #include "advapi32.h"25 27 #include <unicode.h> 26 28 #include <win\winreg.h> 27 29 #include <win\winsvc.h> 28 30 #include <heapstring.h> 31 #define USE_ODIN_REGISTRY_APIS 32 #include "advapi32.h" 29 33 30 34 ODINDEBUGCHANNEL(ADVAPI32-SERVICE) … … 46 50 #define REG_SERVICE_TAG "Tag" 47 51 #define REG_SERVICE_TAG_W (LPWSTR)L"Tag" 52 48 53 //Odin key 54 #define REG_SERVICE_BITS "ServiceBits" 55 #define REG_SERVICE_CONTROLS_ACCEPTED "ServiceControlsAccepted" 56 #define REG_SERVICE_CHECKPOINT "dwCheckPoint" 57 #define REG_SERVICE_WAITHINT "dwWaitHint" 58 #define REG_SERVICE_EXITCODE "dwWin32ExitCode" 59 #define REG_SERVICE_SPECIFIC_EXITCODE "dwServiceSpecificExitCode" 49 60 #define REG_SERVICE_STATUS "ServiceStatus" 50 61 #define REG_SERVICE_STATUS_W (LPWSTR)L"ServiceStatus" 51 62 //This key exists if DeleteService has been called for a specific service 52 63 #define REG_SERVICE_DELETEPENDING "DeletePending" 64 65 //Win32 service can call StartServiceCtrlDispatcherA/W only once 66 static BOOL fServiceCtrlDispatcherStarted = FALSE; 53 67 54 68 //***************************************************************************** … … 96 110 return 0; 97 111 } 112 SetLastError(0); 98 113 return keyServices; 99 114 } … … 183 198 return 0; 184 199 } 200 SetLastError(0); 185 201 return keyThisService; 186 202 } … … 377 393 378 394 return (FALSE); /* signal failure */ 379 }380 381 382 /*****************************************************************************383 * Name : SetServiceStatus384 * Purpose : The SetServiceStatus function updates the service control385 * manager's status information for the calling service.386 * Parameters: SERVICE_STATUS_HANDLE sshServiceStatus service status handle387 * LPSERVICE_STATUS lpssServiceStatus address of status structure388 * Variables :389 * Result :390 * Remark :391 * Status : UNTESTED STUB392 *393 * Author : Patrick Haller [Tue, 1998/06/16 23:00]394 *****************************************************************************/395 396 BOOL WIN32API SetServiceStatus(SERVICE_STATUS_HANDLE sshServiceStatus,397 LPSERVICE_STATUS lpssServiceStatus)398 {399 dprintf(("ADVAPI32: SetServiceStatus(%08xh,%08xh) not implemented.\n",400 sshServiceStatus,401 lpssServiceStatus));402 403 if(CheckServiceHandle(sshServiceStatus) == FALSE) {404 SetLastError(ERROR_INVALID_PARAMETER);405 return FALSE;406 }407 408 return (FALSE); /* signal failure */409 }410 411 /*****************************************************************************412 * Name : QueryServiceStatus413 * Purpose : The QueryServiceStatus function retrieves the current status of414 * the specified service.415 * Parameters: SC_HANDLE schService handle of service416 * LPSERVICE_STATUS lpssServiceStatus address of service status structure417 * Variables :418 * Result :419 * Remark :420 * Status : UNTESTED STUB421 *422 * Author : Patrick Haller [Tue, 1998/06/16 23:00]423 *****************************************************************************/424 425 BOOL WIN32API QueryServiceStatus(SC_HANDLE schService,426 LPSERVICE_STATUS lpssServiceStatus)427 {428 DWORD size, keytype;429 430 dprintf(("ADVAPI32: QueryServiceStatus(%08xh,%08xh) not correctly implemented.\n",431 schService,432 lpssServiceStatus));433 434 if(CheckServiceHandle(schService) == FALSE) {435 SetLastError(ERROR_INVALID_PARAMETER);436 return FALSE;437 }438 439 memset(lpssServiceStatus, 0, sizeof(SERVICE_STATUS));440 441 size = sizeof(DWORD);442 keytype = REG_DWORD;443 RegQueryValueExA((HKEY)schService, REG_SERVICE_TYPE, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwServiceType, &size);444 445 size = sizeof(DWORD);446 keytype = REG_DWORD;447 RegQueryValueExA((HKEY)schService, REG_SERVICE_STATUS, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwCurrentState, &size);448 449 //TODO: Should this be set by the service once it has started?450 lpssServiceStatus->dwControlsAccepted = SERVICE_ACCEPT_STOP|SERVICE_ACCEPT_PAUSE_CONTINUE|SERVICE_ACCEPT_SHUTDOWN;451 return TRUE;452 395 } 453 396 … … 497 440 * Result : 498 441 * Remark : 499 * Status : UNTESTED STUB500 * 501 * Author : Patrick Haller [Tue, 1998/06/16 23:00]442 * Status : 443 * 444 * Author : SvL 502 445 *****************************************************************************/ 503 446 … … 549 492 * Result : 550 493 * Remark : 551 * Status : UNTESTED STUB552 * 553 * Author : Patrick Haller [Tue, 1998/06/16 23:00]494 * Status : 495 * 496 * Author : SvL 554 497 *****************************************************************************/ 555 498 … … 566 509 LPCWSTR lpDisplayName) 567 510 { 511 LPSTR lpDisplayNameA = NULL, lpBinaryPathNameA = NULL; 512 LPSTR lpDependenciesA = NULL, lpServiceStartNameA = NULL, lpPasswordA = NULL; 513 LPSTR lpLoadOrderGroupA = NULL; 514 BOOL fRc; 515 568 516 dprintf(("ADVAPI32: ChangeServiceConfigW(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n", 569 517 hService, … … 579 527 lpDisplayName)); 580 528 581 return (FALSE); /* signal failure */ 529 if(lpDisplayName) 530 lpDisplayNameA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpDisplayName); 531 if(lpBinaryPathName) 532 lpBinaryPathNameA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpBinaryPathName); 533 if(lpDependencies) 534 lpDependenciesA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpDependencies); 535 if(lpServiceStartName) 536 lpServiceStartNameA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpServiceStartName); 537 if(lpPassword) 538 lpPasswordA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpPassword); 539 if(lpDisplayName) 540 lpDisplayNameA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpDisplayName); 541 if(lpLoadOrderGroup) 542 lpLoadOrderGroupA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpLoadOrderGroup); 543 544 fRc = ChangeServiceConfigA(hService,dwServiceType, dwStartType, dwErrorControl, 545 lpBinaryPathNameA, 546 lpLoadOrderGroupA, 547 lpdwTagId, 548 lpDependenciesA, 549 lpServiceStartNameA, 550 lpPasswordA, 551 lpDisplayNameA); 552 553 if(lpDisplayNameA) HeapFree(GetProcessHeap(), 0, lpDisplayNameA); 554 if(lpBinaryPathNameA) HeapFree(GetProcessHeap(), 0, lpBinaryPathNameA); 555 if(lpDependenciesA) HeapFree(GetProcessHeap(), 0, lpDependenciesA); 556 if(lpServiceStartNameA) HeapFree(GetProcessHeap(), 0, lpServiceStartNameA); 557 if(lpPasswordA) HeapFree(GetProcessHeap(), 0, lpPasswordA); 558 if(lpLoadOrderGroupA) HeapFree(GetProcessHeap(), 0, lpLoadOrderGroupA); 559 560 return fRc; 582 561 } 583 562 … … 593 572 * Result : 594 573 * Remark : 595 * Status : UNTESTED STUB596 * 597 * Author : Patrick Haller [Tue, 1998/06/16 23:00]574 * Status : 575 * 576 * Author : SvL 598 577 *****************************************************************************/ 599 578 … … 629 608 630 609 RegCloseKey((HKEY)hSCObject); 610 SetLastError(0); 631 611 return TRUE; 632 612 } … … 641 621 * Result : 642 622 * Remark : 643 * Status : UNTESTED STUB644 * 645 * Author : Patrick Haller [Tue, 1998/06/16 23:00]623 * Status : 624 * 625 * Author : SvL 646 626 *****************************************************************************/ 647 627 … … 660 640 return FALSE; 661 641 } 642 SetLastError(0); 662 643 return TRUE; 663 644 } … … 684 665 * Result : 685 666 * Remark : 686 * Status : UNTESTED STUB687 * 688 * Author : Patrick Haller [Tue, 1998/06/16 23:00]667 * Status : 668 * 669 * Author : SvL 689 670 *****************************************************************************/ 690 671 … … 766 747 767 748 RegCloseKey(keyServices); 749 SetLastError(0); 768 750 return keyThisService; 769 751 } … … 790 772 * Result : 791 773 * Remark : 792 * Status : UNTESTED STUB793 * 794 * Author : Patrick Haller [Tue, 1998/06/16 23:00]774 * Status : 775 * 776 * Author : SvL 795 777 *****************************************************************************/ 796 778 … … 872 854 * Result : 873 855 * Remark : 874 * Status : UNTESTED STUB875 * 876 * Author : Patrick Haller [Tue, 1998/06/16 23:00]856 * Status : 857 * 858 * Author : SvL 877 859 *****************************************************************************/ 878 860 … … 893 875 DWORD state = SERVICE_RUNNING; 894 876 if(!RegSetValueExA((HKEY)schService, REG_SERVICE_STATUS, 0, REG_DWORD, (LPBYTE)&state, sizeof(DWORD))) { 877 SetLastError(0); 895 878 return TRUE; 896 879 } 897 880 881 //TODO: Really start service 898 882 return (FALSE); /* signal failure */ 899 883 } … … 908 892 * Result : 909 893 * Remark : 910 * Status : UNTESTED STUB911 * 912 * Author : Patrick Haller [Tue, 1998/06/16 23:00]894 * Status : 895 * 896 * Author : SvL 913 897 *****************************************************************************/ 914 898 … … 929 913 DWORD state = SERVICE_RUNNING; 930 914 if(!RegSetValueExW((HKEY)schService, REG_SERVICE_STATUS_W, 0, REG_DWORD, (LPBYTE)&state, sizeof(DWORD))) { 915 SetLastError(0); 931 916 return TRUE; 932 917 } 918 //TODO: Really start service 933 919 return (FALSE); /* signal failure */ 934 920 } … … 942 928 * Result : 943 929 * Remark : 944 * Status : UNTESTED STUB945 * 946 * Author : Patrick Haller [Tue, 1998/06/16 23:00]930 * Status : 931 * 932 * Author : SvL 947 933 *****************************************************************************/ 948 934 … … 957 943 DWORD deletepending = 1; 958 944 if(!RegSetValueExA((HKEY)hService, REG_SERVICE_DELETEPENDING, 0, REG_DWORD, (LPBYTE)&deletepending, sizeof(DWORD))) { 945 SetLastError(0); 959 946 return TRUE; 960 947 } … … 974 961 * Result : 975 962 * Remark : 976 * Status : UNTESTED STUB977 * 978 * Author : Patrick Haller [Tue, 1998/06/16 23:00]963 * Status : 964 * 965 * Author : SvL 979 966 *****************************************************************************/ 980 967 … … 1016 1003 *lpcchBuffer = size; 1017 1004 RegCloseKey(keyThisService); 1005 SetLastError(0); 1018 1006 return TRUE; 1019 1007 } … … 1032 1020 * Result : 1033 1021 * Remark : 1034 * Status : UNTESTED STUB1035 * 1036 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1022 * Status : 1023 * 1024 * Author : SvL 1037 1025 *****************************************************************************/ 1038 1026 … … 1074 1062 *lpcchBuffer = size; 1075 1063 RegCloseKey(keyThisService); 1064 SetLastError(0); 1076 1065 return TRUE; 1077 1066 } … … 1345 1334 } 1346 1335 1347 1348 1336 //****************************************************************************** 1337 //Helper for StartServiceCtrlDispatcherA/W; counts nr or arguments in cmd line 1338 //****************************************************************************** 1339 ULONG CountNrArgs(char *cmdline) 1340 { 1341 char *cmd = cmdline; 1342 ULONG nrargs = 0; 1343 1344 while(*cmd == ' ') cmd++; //skip leading spaces 1345 while(*cmd != 0) { 1346 while(*cmd != ' ' && *cmd != 0) cmd++; //skip non-space chars 1347 while(*cmd == ' ' && *cmd != 0) cmd++; //skip spaces 1348 nrargs++; 1349 } 1350 return nrargs; 1351 } 1349 1352 1350 1353 /***************************************************************************** … … 1357 1360 * Result : 1358 1361 * Remark : 1359 * Status : UNTESTED STUB1360 * 1361 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1362 * Status : 1363 * 1364 * Author : SvL 1362 1365 *****************************************************************************/ 1363 1366 1364 1367 BOOL WIN32API StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW lpsteServiceTable) 1365 1368 { 1366 dprintf(("ADVAPI32: StartServiceCtrlDispatcherW(%08xh) not implemented.\n", 1367 lpsteServiceTable)); 1368 1369 return (FALSE); /* signal failure */ 1370 } 1371 1369 ULONG nrArgs = 0; 1370 LPWSTR cmdline; 1371 1372 dprintf(("ADVAPI32: StartServiceCtrlDispatcherW(%x)", lpsteServiceTable)); 1373 1374 if(fServiceCtrlDispatcherStarted == TRUE) { 1375 SetLastError(ERROR_SERVICE_ALREADY_RUNNING); 1376 return FALSE; 1377 } 1378 fServiceCtrlDispatcherStarted = TRUE; 1379 if(lpsteServiceTable->lpServiceProc == NULL) { 1380 SetLastError(ERROR_INVALID_DATA); //or invalid parameter? 1381 return FALSE; 1382 } 1383 while(lpsteServiceTable->lpServiceProc) { 1384 cmdline = (LPWSTR)GetCommandLineW(); 1385 nrArgs = CountNrArgs((LPSTR)GetCommandLineA()); 1386 lpsteServiceTable->lpServiceProc(nrArgs, cmdline); 1387 lpsteServiceTable++; //next service entrypoint 1388 } 1389 SetLastError(0); 1390 return TRUE; 1391 } 1372 1392 1373 1393 /***************************************************************************** … … 1380 1400 * Result : 1381 1401 * Remark : 1382 * Status : UNTESTED STUB1383 * 1384 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1402 * Status : 1403 * 1404 * Author : SvL 1385 1405 *****************************************************************************/ 1386 1406 1387 1407 BOOL WIN32API StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA lpsteServiceTable) 1388 1408 { 1389 dprintf(("ADVAPI32: StartServiceCtrlDispatcherA(%08xh) not implemented.\n", 1390 lpsteServiceTable)); 1391 1409 ULONG nrArgs = 0; 1410 LPSTR cmdline; 1411 1412 dprintf(("ADVAPI32: StartServiceCtrlDispatcherA(%08xh)", lpsteServiceTable)); 1413 1414 if(fServiceCtrlDispatcherStarted == TRUE) { 1415 SetLastError(ERROR_SERVICE_ALREADY_RUNNING); 1416 return FALSE; 1417 } 1418 fServiceCtrlDispatcherStarted = TRUE; 1419 if(lpsteServiceTable->lpServiceProc == NULL) { 1420 SetLastError(ERROR_INVALID_DATA); //or invalid parameter? 1421 return FALSE; 1422 } 1423 while(lpsteServiceTable->lpServiceProc) { 1424 cmdline = (LPSTR)GetCommandLineA(); 1425 nrArgs = CountNrArgs(cmdline); 1426 lpsteServiceTable->lpServiceProc(nrArgs, cmdline); 1427 lpsteServiceTable++; //next service entrypoint 1428 } 1429 SetLastError(0); 1430 return TRUE; 1431 } 1432 1433 /***************************************************************************** 1434 * Name : RegisterServiceCtrlHandlerA 1435 * Purpose : The RegisterServiceCtrlHandler function registers a function to 1436 * handle service control requests for a service. 1437 * Parameters: LPCSTR lpszServiceName address of name of service 1438 * LPHANDLER_FUNCTION lpHandlerProc address of handler function 1439 * Variables : 1440 * Result : 1441 * Remark : 1442 * Status : 1443 * 1444 * Author : SvL 1445 *****************************************************************************/ 1446 1447 SERVICE_STATUS_HANDLE WIN32API RegisterServiceCtrlHandlerA(LPCSTR lpszServiceName, 1448 LPHANDLER_FUNCTION lpHandlerProc) 1449 { 1450 SC_HANDLE hSCMgr, hService; 1451 1452 dprintf(("ADVAPI32: RegisterServiceCtrlHandlerA(%s,%08xh) not implemented (FAKED)", 1453 lpszServiceName, 1454 lpHandlerProc)); 1455 1456 //Doesn't work for services of type 1457 if(lpszServiceName == NULL) { 1458 SetLastError(ERROR_INVALID_NAME); 1459 return 0; 1460 } 1461 hSCMgr = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); 1462 hService = OpenServiceA(hSCMgr, lpszServiceName, SERVICE_ALL_ACCESS); 1463 if(hService == 0) { 1464 SetLastError(ERROR_INVALID_NAME); 1465 return 0; 1466 } 1467 CloseServiceHandle(hSCMgr); 1468 //TODO: Start thread with ctrl handler 1469 SetLastError(0); 1470 return hService; 1471 } 1472 1473 1474 /***************************************************************************** 1475 * Name : RegisterServiceCtrlHandlerW 1476 * Purpose : The RegisterServiceCtrlHandler function registers a function to 1477 * handle service control requests for a service. 1478 * Parameters: LPCWSTR lpszServiceName address of name of service 1479 * LPHANDLER_FUNCTION lpHandlerProc address of handler function 1480 * Variables : 1481 * Result : 1482 * Remark : 1483 * Status : 1484 * 1485 * Author : SvL 1486 *****************************************************************************/ 1487 1488 SERVICE_STATUS_HANDLE WIN32API RegisterServiceCtrlHandlerW(LPCWSTR lpszServiceName, 1489 LPHANDLER_FUNCTION lpHandlerProc) 1490 { 1491 SC_HANDLE hSCMgr, hService; 1492 1493 dprintf(("ADVAPI32: RegisterServiceCtrlHandlerW(%s,%08xh) not implemented (FAKED)", 1494 lpszServiceName, 1495 lpHandlerProc)); 1496 1497 //Doesn't work for services of type 1498 if(lpszServiceName == NULL) { 1499 SetLastError(ERROR_INVALID_NAME); 1500 return 0; 1501 } 1502 hSCMgr = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); 1503 hService = OpenServiceW(hSCMgr, lpszServiceName, SERVICE_ALL_ACCESS); 1504 if(hService == 0) { 1505 SetLastError(ERROR_INVALID_NAME); 1506 return 0; 1507 } 1508 CloseServiceHandle(hSCMgr); 1509 //TODO: Start thread with ctrl handler 1510 SetLastError(0); 1511 return hService; 1512 } 1513 1514 /***************************************************************************** 1515 * Name : SetServiceBits 1516 * Purpose : The SetServiceBits function registers a service's service type 1517 * with the Service Control Manager and the Server service. The 1518 * Server service can then announce the registered service type 1519 * as one it currently supports. The LAN Manager functions 1520 * NetServerGetInfo and NetServerEnum obtain a specified machine's 1521 * supported service types. 1522 * A service type is represented as a set of bit flags; the 1523 * SetServiceBits function sets or clears combinations of those bit flags. 1524 * Parameters: SERVICE_STATUS_HANDLE hServiceStatus service status handle 1525 * DWORD dwServiceBits service type bits to set or clear 1526 * BOOL bSetBitsOn flag to set or clear the service type bits 1527 * BOOL bUpdateImmediately flag to announce server type immediately 1528 * Variables : 1529 * Result : 1530 * Remark : 1531 * Status : 1532 * 1533 * Author : SvL 1534 *****************************************************************************/ 1535 1536 BOOL WIN32API SetServiceBits(SERVICE_STATUS_HANDLE hServiceStatus, 1537 DWORD dwServiceBits, 1538 BOOL bSetBitsOn, 1539 BOOL bUpdateImmediately) 1540 { 1541 ULONG size, keytype, servicebits; 1542 1543 dprintf(("ADVAPI32: SetServiceBits(%08xh,%08xh,%08xh,%08xh) not correctly implemented", 1544 hServiceStatus, 1545 dwServiceBits, 1546 bSetBitsOn, 1547 bUpdateImmediately)); 1548 1549 if(CheckServiceHandle(hServiceStatus) == FALSE) { 1550 SetLastError(ERROR_INVALID_PARAMETER); 1551 return FALSE; 1552 } 1553 //According to the Platform SDK these bits are reserved by MS and we should return 1554 //ERROR_INVALID_DATA 1555 if(dwServiceBits & 0xC00F3F7B) { 1556 SetLastError(ERROR_INVALID_DATA); 1557 return FALSE; 1558 } 1559 1560 size = sizeof(DWORD); 1561 keytype = REG_DWORD; 1562 if(RegQueryValueExA((HKEY)hServiceStatus, REG_SERVICE_BITS, 0, &keytype, (LPBYTE)&servicebits, &size)) { 1563 servicebits = 0; 1564 } 1565 if(bSetBitsOn) { 1566 servicebits |= dwServiceBits; 1567 } 1568 else servicebits &= (~dwServiceBits); 1569 1570 if(!RegSetValueExA((HKEY)hServiceStatus, REG_SERVICE_BITS, 0, REG_DWORD, (LPBYTE)&servicebits, sizeof(DWORD))) { 1571 SetLastError(0); 1572 return TRUE; 1573 } 1392 1574 return (FALSE); /* signal failure */ 1393 1575 } 1394 1576 1395 1577 /***************************************************************************** 1578 * Name : SetServiceStatus 1579 * Purpose : The SetServiceStatus function updates the service control 1580 * manager's status information for the calling service. 1581 * Parameters: SERVICE_STATUS_HANDLE sshServiceStatus service status handle 1582 * LPSERVICE_STATUS lpssServiceStatus address of status structure 1583 * Variables : 1584 * Result : 1585 * Remark : Called from ServiceMain function (registered with RegisterServiceCtrlHandler) 1586 * Status : 1587 * 1588 * Author : SvL 1589 *****************************************************************************/ 1590 1591 BOOL WIN32API SetServiceStatus(SERVICE_STATUS_HANDLE sshServiceStatus, 1592 LPSERVICE_STATUS lpssServiceStatus) 1593 { 1594 dprintf(("ADVAPI32: SetServiceStatus(%08xh,%08xh) not implemented correctly.\n", 1595 sshServiceStatus, 1596 lpssServiceStatus)); 1597 1598 if(CheckServiceHandle(sshServiceStatus) == FALSE) { 1599 SetLastError(ERROR_INVALID_PARAMETER); 1600 return FALSE; 1601 } 1602 1603 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_TYPE, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwServiceType, sizeof(DWORD)); 1604 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_STATUS, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwCurrentState, sizeof(DWORD)); 1605 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_CONTROLS_ACCEPTED, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwControlsAccepted, sizeof(DWORD)); 1606 1607 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_EXITCODE, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwWin32ExitCode, sizeof(DWORD)); 1608 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_SPECIFIC_EXITCODE, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwServiceSpecificExitCode, sizeof(DWORD)); 1609 1610 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_CHECKPOINT, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwCheckPoint, sizeof(DWORD)); 1611 RegSetValueExA((HKEY)sshServiceStatus, REG_SERVICE_WAITHINT, 0, REG_DWORD, (LPBYTE)&lpssServiceStatus->dwWaitHint, sizeof(DWORD)); 1612 1613 SetLastError(0); 1614 return TRUE; 1615 } 1616 1617 /***************************************************************************** 1618 * Name : QueryServiceStatus 1619 * Purpose : The QueryServiceStatus function retrieves the current status of 1620 * the specified service. 1621 * Parameters: SC_HANDLE schService handle of service 1622 * LPSERVICE_STATUS lpssServiceStatus address of service status structure 1623 * Variables : 1624 * Result : 1625 * Remark : 1626 * Status : 1627 * 1628 * Author : SvL 1629 *****************************************************************************/ 1630 1631 BOOL WIN32API QueryServiceStatus(SC_HANDLE schService, 1632 LPSERVICE_STATUS lpssServiceStatus) 1633 { 1634 DWORD size, keytype; 1635 1636 dprintf(("ADVAPI32: QueryServiceStatus(%08xh,%08xh) not correctly implemented.\n", 1637 schService, 1638 lpssServiceStatus)); 1639 1640 if(CheckServiceHandle(schService) == FALSE) { 1641 SetLastError(ERROR_INVALID_PARAMETER); 1642 return FALSE; 1643 } 1644 1645 memset(lpssServiceStatus, 0, sizeof(SERVICE_STATUS)); 1646 1647 size = sizeof(DWORD); 1648 keytype = REG_DWORD; 1649 RegQueryValueExA((HKEY)schService, REG_SERVICE_TYPE, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwServiceType, &size); 1650 1651 size = sizeof(DWORD); 1652 keytype = REG_DWORD; 1653 RegQueryValueExA((HKEY)schService, REG_SERVICE_STATUS, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwCurrentState, &size); 1654 1655 size = sizeof(DWORD); 1656 keytype = REG_DWORD; 1657 RegQueryValueExA((HKEY)schService, REG_SERVICE_CONTROLS_ACCEPTED, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwControlsAccepted, &size); 1658 1659 size = sizeof(DWORD); 1660 keytype = REG_DWORD; 1661 RegQueryValueExA((HKEY)schService, REG_SERVICE_EXITCODE, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwWin32ExitCode, &size); 1662 1663 size = sizeof(DWORD); 1664 keytype = REG_DWORD; 1665 RegQueryValueExA((HKEY)schService, REG_SERVICE_SPECIFIC_EXITCODE, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwServiceSpecificExitCode, &size); 1666 1667 size = sizeof(DWORD); 1668 keytype = REG_DWORD; 1669 RegQueryValueExA((HKEY)schService, REG_SERVICE_CHECKPOINT, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwCheckPoint, &size); 1670 1671 size = sizeof(DWORD); 1672 keytype = REG_DWORD; 1673 RegQueryValueExA((HKEY)schService, REG_SERVICE_WAITHINT, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwWaitHint, &size); 1674 1675 SetLastError(0); 1676 return TRUE; 1677 }
Note:
See TracChangeset
for help on using the changeset viewer.