- Timestamp:
- Dec 21, 1999, 1:35:28 AM (26 years ago)
- Location:
- trunk/src/advapi32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/advapi32/ADVAPI32.CPP
r2152 r2172 1 /* $Id: ADVAPI32.CPP,v 1.1 1 1999-12-20 10:12:04sandervl Exp $ */1 /* $Id: ADVAPI32.CPP,v 1.12 1999-12-21 00:35:28 sandervl Exp $ */ 2 2 3 3 /* … … 2031 2031 2032 2032 2033 /***************************************************************************** 2034 * Name : SetServiceStatus 2035 * Purpose : The SetServiceStatus function updates the service control 2036 * manager's status information for the calling service. 2037 * Parameters: SERVICE_STATUS_HANDLE sshServiceStatus service status handle 2038 * LPSERVICE_STATUS lpssServiceStatus address of status structure 2039 * Variables : 2040 * Result : 2041 * Remark : 2042 * Status : UNTESTED STUB 2043 * 2044 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 2045 *****************************************************************************/ 2046 2047 BOOL WIN32API SetServiceStatus(SERVICE_STATUS_HANDLE sshServiceStatus, 2048 LPSERVICE_STATUS lpssServiceStatus) 2049 { 2050 dprintf(("ADVAPI32: SetServiceStatus(%08xh,%08xh) not implemented.\n", 2051 sshServiceStatus, 2052 lpssServiceStatus)); 2053 2054 return (FALSE); /* signal failure */ 2055 } 2056 2057 2058 2059 /***************************************************************************** 2060 * Name : StartServiceCtrlDispatcherW 2061 * Purpose : The StartServiceCtrlDispatcher function connects the main thread 2062 * of a service process to the service control manager, which causes 2063 * the thread to be the service control dispatcher thread for the calling process. 2064 * Parameters: LPSERVICE_TABLE_ENTRY lpsteServiceTable address of service table 2065 * Variables : 2066 * Result : 2067 * Remark : 2068 * Status : UNTESTED STUB 2069 * 2070 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 2071 *****************************************************************************/ 2072 2073 #define LPSERVICE_TABLE_ENTRY LPVOID 2074 BOOL WIN32API StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRY lpsteServiceTable) 2075 { 2076 dprintf(("ADVAPI32: StartServiceCtrlDispatcherW(%08xh) not implemented.\n", 2077 lpsteServiceTable)); 2078 2079 return (FALSE); /* signal failure */ 2080 } 2081 2082 2083 /***************************************************************************** 2084 * Name : StartServiceCtrlDispatcherA 2085 * Purpose : The StartServiceCtrlDispatcher function connects the main thread 2086 * of a service process to the service control manager, which causes 2087 * the thread to be the service control dispatcher thread for the calling process. 2088 * Parameters: LPSERVICE_TABLE_ENTRY lpsteServiceTable address of service table 2089 * Variables : 2090 * Result : 2091 * Remark : 2092 * Status : UNTESTED STUB 2093 * 2094 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 2095 *****************************************************************************/ 2096 2097 BOOL WIN32API StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRY lpsteServiceTable) 2098 { 2099 dprintf(("ADVAPI32: StartServiceCtrlDispatcherA(%08xh) not implemented.\n", 2100 lpsteServiceTable)); 2101 2102 return (FALSE); /* signal failure */ 2103 } 2104 2105 2106 2033 -
trunk/src/advapi32/registry.cpp
r2150 r2172 1 /* $Id: registry.cpp,v 1. 8 1999-12-19 22:05:39sandervl Exp $ */1 /* $Id: registry.cpp,v 1.9 1999-12-21 00:31:38 sandervl Exp $ */ 2 2 3 3 /* … … 233 233 LONG rc; 234 234 235 dprintf(("RegDeleteKeyW %s", astring)); 235 236 rc = _O32_RegDeleteKey(ConvertKey(hKey), 236 237 astring); … … 255 256 LPCSTR,lpszSubKey) 256 257 { 258 dprintf(("RegDeleteKeyW %s", lpszSubKey)); 257 259 return _O32_RegDeleteKey(ConvertKey(hKey), 258 260 lpszSubKey); -
trunk/src/advapi32/service.cpp
r2150 r2172 1 /* $Id: service.cpp,v 1. 2 1999-12-19 22:05:40sandervl Exp $ */1 /* $Id: service.cpp,v 1.3 1999-12-21 00:31:38 sandervl Exp $ */ 2 2 3 3 /* … … 21 21 #include <string.h> 22 22 #include <odinwrap.h> 23 #include "misc.h"23 #include <misc.h> 24 24 #include "advapi32.h" 25 #include "unicode.h" 26 #include "winreg.h" 25 #include <unicode.h> 26 #include <win\winreg.h> 27 #include <win\winsvc.h> 27 28 #include <heapstring.h> 28 29 29 30 ODINDEBUGCHANNEL(ADVAPI32-SERVICE) 30 31 31 #define SC_HANDLE HANDLE 32 #define SC_LOCK DWORD 32 #define REG_SERVICE_TYPE "Start" 33 #define REG_SERVICE_TYPE_W (LPWSTR)L"Start" 34 #define REG_SERVICE_STARTTYPE "Type" 35 #define REG_SERVICE_STARTTYPE_W (LPWSTR)L"Type" 36 #define REG_SERVICE_ERRORCONTROL "ErrorControl" 37 #define REG_SERVICE_ERRORCONTROL_W (LPWSTR)L"ErrorControl" 38 #define REG_SERVICE_DISPLAYNAME "DisplayName" 39 #define REG_SERVICE_DISPLAYNAME_W (LPWSTR)L"DisplayName" 40 #define REG_SERVICE_LOADORDERGROUP "Group" //??? 41 #define REG_SERVICE_LOADORDERGROUP_W (LPWSTR)L"Group" //??? 42 #define REG_SERVICE_DEPENDENCIES "DependOnGroup" 43 #define REG_SERVICE_DEPENDENCIES_W (LPWSTR)L"DependOnGroup" 44 #define REG_SERVICE_IMAGEPATH "ImagePath" 45 #define REG_SERVICE_IMAGEPATH_W (LPWSTR)L"ImagePath" 46 #define REG_SERVICE_TAG "Tag" 47 #define REG_SERVICE_TAG_W (LPWSTR)L"Tag" 48 //Odin key 49 #define REG_SERVICE_STATUS "ServiceStatus" 50 #define REG_SERVICE_STATUS_W (LPWSTR)L"ServiceStatus" 51 //This key exists if DeleteService has been called for a specific service 52 #define REG_SERVICE_DELETEPENDING "DeletePending" 33 53 34 54 //***************************************************************************** … … 219 239 *****************************************************************************/ 220 240 221 #define LPQUERY_SERVICE_CONFIG LPVOID222 241 BOOL WIN32API QueryServiceConfigA(SC_HANDLE schService, 223 242 LPQUERY_SERVICE_CONFIG lpqscServConfig, … … 282 301 *****************************************************************************/ 283 302 284 #define LPQUERY_SERVICE_LOCK_STATUS LPVOID285 303 BOOL WIN32API QueryServiceLockStatusA(SC_HANDLE schSCManager, 286 LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,304 LPQUERY_SERVICE_LOCK_STATUSA lpqslsLockStat, 287 305 DWORD cbBufSize, 288 306 LPDWORD lpcbBytesNeeded) … … 315 333 316 334 BOOL WIN32API QueryServiceLockStatusW(SC_HANDLE schSCManager, 317 LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,335 LPQUERY_SERVICE_LOCK_STATUSW lpqslsLockStat, 318 336 DWORD cbBufSize, 319 337 LPDWORD lpcbBytesNeeded) … … 379 397 LPSERVICE_STATUS lpssServiceStatus) 380 398 { 399 DWORD size, keytype; 400 381 401 dprintf(("ADVAPI32: QueryServiceStatus(%08xh,%08xh) not correctly implemented.\n", 382 402 schService, … … 389 409 390 410 memset(lpssServiceStatus, 0, sizeof(SERVICE_STATUS)); 411 412 size = sizeof(DWORD); 413 keytype = REG_DWORD; 414 RegQueryValueExA((HKEY)schService, REG_SERVICE_TYPE, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwServiceType, &size); 415 416 size = sizeof(DWORD); 417 keytype = REG_DWORD; 418 RegQueryValueExA((HKEY)schService, REG_SERVICE_STATUS, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwCurrentState, &size); 419 420 //TODO: Should this be set by the service once it has started? 421 lpssServiceStatus->dwControlsAccepted = SERVICE_ACCEPT_STOP|SERVICE_ACCEPT_PAUSE_CONTINUE|SERVICE_ACCEPT_SHUTDOWN; 391 422 return TRUE; 392 423 } … … 546 577 SetLastError(ERROR_INVALID_PARAMETER); 547 578 return FALSE; 579 } 580 581 DWORD deletepending, keytype = REG_DWORD, size = sizeof(DWORD); 582 if(!RegQueryValueExA((HKEY)hSCObject, REG_SERVICE_DELETEPENDING, 0, &keytype, (LPBYTE)&deletepending, &size)) { 583 FILETIME filetime; 584 DWORD bla, classsize; 585 CHAR szClassName[64]; 586 587 HKEY keyServices; 588 if(RegCreateKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services", &keyServices) != 0) { 589 SetLastError(ERROR_INTERNAL_ERROR); 590 return FALSE; 591 } 592 593 //NOTE: Assumes for now there are no subkeys 594 //TODO: DOes not work 595 classsize = sizeof(szClassName); 596 RegQueryValueA((HKEY)hSCObject, NULL, szClassName, (LPLONG)&classsize); 597 RegCloseKey((HKEY)hSCObject); 598 RegDeleteKeyA(keyServices, szClassName); 548 599 } 549 600 … … 654 705 return 0; 655 706 } 656 RegSetValueExA(keyThisService, "Start", 0, REG_DWORD, (LPBYTE)&dwServiceType, sizeof(DWORD));657 RegSetValueExA(keyThisService, "Type", 0, REG_DWORD, (LPBYTE)&dwStartType, sizeof(DWORD));658 RegSetValueExA(keyThisService, "ErrorControl", 0, REG_DWORD, (LPBYTE)&dwErrorControl, sizeof(DWORD));707 RegSetValueExA(keyThisService, REG_SERVICE_TYPE, 0, REG_DWORD, (LPBYTE)&dwServiceType, sizeof(DWORD)); 708 RegSetValueExA(keyThisService, REG_SERVICE_STARTTYPE, 0, REG_DWORD, (LPBYTE)&dwStartType, sizeof(DWORD)); 709 RegSetValueExA(keyThisService, REG_SERVICE_ERRORCONTROL, 0, REG_DWORD, (LPBYTE)&dwErrorControl, sizeof(DWORD)); 659 710 if(lpDisplayName) 660 RegSetValueExA(keyThisService, "DisplayName", 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpDisplayName)+1);711 RegSetValueExA(keyThisService, REG_SERVICE_DISPLAYNAME, 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpDisplayName)+1); 661 712 if(lpLoadOrderGroup) 662 RegSetValueExA(keyThisService, "lpLoadOrderGroup", 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpLoadOrderGroup)+1); 663 if(lpLoadOrderGroup) 664 RegSetValueExA(keyThisService, "lpLoadOrderGroup", 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpLoadOrderGroup)+1); 713 RegSetValueExA(keyThisService, REG_SERVICE_LOADORDERGROUP, 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpLoadOrderGroup)+1); 714 if(lpDependencies) { 715 //seems to need an extra terminating '0' 716 int size = strlen(lpDependencies)+2; 717 char *dependencies = (char *)malloc(size); 718 memset(dependencies, 0, size); 719 strcpy(dependencies, lpDependencies); 720 RegSetValueExA(keyThisService, REG_SERVICE_DEPENDENCIES, 0, REG_BINARY, (LPBYTE)dependencies, size); 721 free(dependencies); 722 } 665 723 //TODO: %SystemRoot% 666 RegSetValueExA(keyThisService, "ImagePath", 0, REG_SZ, (LPBYTE)lpBinaryPathName, strlen(lpBinaryPathName)+1); 667 724 RegSetValueExA(keyThisService, REG_SERVICE_IMAGEPATH, 0, REG_SZ, (LPBYTE)lpBinaryPathName, strlen(lpBinaryPathName)+1); 725 726 //Pointer to a variable that receives a tag value that is unique in the group specified in the 727 //lpLoadOrderGroup parameter. Specify NULL if you are not changing the existing tag. 728 DWORD tag = 1; //TODO!! 729 RegSetValueExA(keyThisService, REG_SERVICE_TAG, 0, REG_DWORD, (LPBYTE)&tag, sizeof(DWORD)); 730 if(lpdwTagId) 731 *lpdwTagId = tag; 732 733 DWORD state = SERVICE_STOPPED; 734 RegSetValueExA(keyThisService, REG_SERVICE_STATUS, 0, REG_DWORD, (LPBYTE)&state, sizeof(DWORD)); 735 668 736 //TODO: What else? 669 737 … … 767 835 768 836 /***************************************************************************** 837 * Name : StartServiceA 838 * Purpose : The StartService function starts the execution of a service. 839 * Parameters: SC_HANDLE schService handle of service 840 * DWORD dwNumServiceArgs number of arguments 841 * LPCSTR *lpszServiceArgs address of array of argument string pointers 842 * Variables : 843 * Result : 844 * Remark : 845 * Status : UNTESTED STUB 846 * 847 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 848 *****************************************************************************/ 849 850 BOOL WIN32API StartServiceA(SC_HANDLE schService, 851 DWORD dwNumServiceArgs, 852 LPCSTR *lpszServiceArgs) 853 { 854 dprintf(("ADVAPI32: StartServiceA(%08xh,%08xh,%s) not implemented.\n", 855 schService, 856 dwNumServiceArgs, 857 lpszServiceArgs)); 858 859 if(CheckServiceHandle(schService) == FALSE) { 860 SetLastError(ERROR_INVALID_PARAMETER); 861 return FALSE; 862 } 863 864 DWORD state = SERVICE_RUNNING; 865 if(!RegSetValueExA((HKEY)schService, REG_SERVICE_STATUS, 0, REG_DWORD, (LPBYTE)&state, sizeof(DWORD))) { 866 return TRUE; 867 } 868 869 return (FALSE); /* signal failure */ 870 } 871 872 /***************************************************************************** 873 * Name : StartServiceW 874 * Purpose : The StartService function starts the execution of a service. 875 * Parameters: SC_HANDLE schService handle of service 876 * DWORD dwNumServiceArgs number of arguments 877 * LPCWSTR *lpszServiceArgs address of array of argument string pointers 878 * Variables : 879 * Result : 880 * Remark : 881 * Status : UNTESTED STUB 882 * 883 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 884 *****************************************************************************/ 885 886 BOOL WIN32API StartServiceW(SC_HANDLE schService, 887 DWORD dwNumServiceArgs, 888 LPCWSTR *lpszServiceArgs) 889 { 890 dprintf(("ADVAPI32: StartServiceW(%08xh,%08xh,%s) not implemented.\n", 891 schService, 892 dwNumServiceArgs, 893 lpszServiceArgs)); 894 895 if(CheckServiceHandle(schService) == FALSE) { 896 SetLastError(ERROR_INVALID_PARAMETER); 897 return FALSE; 898 } 899 900 DWORD state = SERVICE_RUNNING; 901 if(!RegSetValueExW((HKEY)schService, REG_SERVICE_STATUS_W, 0, REG_DWORD, (LPBYTE)&state, sizeof(DWORD))) { 902 return TRUE; 903 } 904 return (FALSE); /* signal failure */ 905 } 906 907 /***************************************************************************** 769 908 * Name : DeleteService 770 909 * Purpose : The DeleteService function marks the specified service for … … 781 920 BOOL WIN32API DeleteService(SC_HANDLE hService) 782 921 { 783 dprintf(("ADVAPI32: DeleteService(%08xh) not implemented.\n", 784 hService)); 785 922 dprintf(("ADVAPI32: DeleteService(%08xh)", hService)); 923 924 if(CheckServiceHandle(hService) == FALSE) { 925 SetLastError(ERROR_INVALID_PARAMETER); 926 return FALSE; 927 } 928 DWORD deletepending = 1; 929 if(!RegSetValueExA((HKEY)hService, REG_SERVICE_DELETEPENDING, 0, REG_DWORD, (LPBYTE)&deletepending, sizeof(DWORD))) { 930 return TRUE; 931 } 786 932 return FALSE; 933 } 934 935 /***************************************************************************** 936 * Name : GetServiceDisplayNameA 937 * Purpose : The GetServiceDisplayName function obtains the display name that 938 * is associated with a particular service name. The service name 939 * is the same as the service's registry key name. 940 * Parameters: SC_HANDLE hSCManager handle to a service control manager database 941 * LPCSTR lpServiceName the service name 942 * LPTSTR lpDisplayName buffer to receive the service's display name 943 * LPDWORD lpcchBuffer size of display name buffer and display name 944 * Variables : 945 * Result : 946 * Remark : 947 * Status : UNTESTED STUB 948 * 949 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 950 *****************************************************************************/ 951 952 BOOL WIN32API GetServiceDisplayNameA(SC_HANDLE hSCManager, 953 LPCSTR lpServiceName, 954 LPTSTR lpDisplayName, 955 LPDWORD lpcchBuffer) 956 { 957 HKEY keyThisService; 958 DWORD size, type; 959 960 dprintf(("ADVAPI32: GetServiceDisplayNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n", 961 hSCManager, 962 lpServiceName, 963 lpDisplayName, 964 lpcchBuffer)); 965 966 if(!lpServiceName || !lpDisplayName) { 967 SetLastError(ERROR_INVALID_PARAMETER); 968 return FALSE; 969 } 970 if(CheckServiceHandle(hSCManager) == FALSE) { 971 SetLastError(ERROR_INVALID_PARAMETER); 972 return FALSE; 973 } 974 975 if(RegOpenKeyA((HKEY)hSCManager, lpServiceName, &keyThisService) != 0) { 976 SetLastError(ERROR_SERVICE_DOES_NOT_EXIST); 977 return FALSE; 978 } 979 size = *lpcchBuffer; 980 type = REG_SZ; 981 if(RegQueryValueExA(keyThisService, REG_SERVICE_DISPLAYNAME, 0, &type, (LPBYTE)lpDisplayName, &size) == ERROR_MORE_DATA) 982 { 983 SetLastError(ERROR_MORE_DATA); 984 *lpcchBuffer = size; 985 return FALSE; 986 } 987 *lpcchBuffer = size; 988 RegCloseKey(keyThisService); 989 return TRUE; 990 } 991 992 993 /***************************************************************************** 994 * Name : GetServiceDisplayNameW 995 * Purpose : The GetServiceDisplayName function obtains the display name that 996 * is associated with a particular service name. The service name 997 * is the same as the service's registry key name. 998 * Parameters: SC_HANDLE hSCManager handle to a service control manager database 999 * LPCWSTR lpServiceName the service name 1000 * LPWSTR lpDisplayName buffer to receive the service's display name 1001 * LPDWORD lpcchBuffer size of display name buffer and display name 1002 * Variables : 1003 * Result : 1004 * Remark : 1005 * Status : UNTESTED STUB 1006 * 1007 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 1008 *****************************************************************************/ 1009 1010 BOOL WIN32API GetServiceDisplayNameW(SC_HANDLE hSCManager, 1011 LPCWSTR lpServiceName, 1012 LPWSTR lpDisplayName, 1013 LPDWORD lpcchBuffer) 1014 { 1015 HKEY keyThisService; 1016 DWORD size, type; 1017 1018 dprintf(("ADVAPI32: GetServiceDisplayNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n", 1019 hSCManager, 1020 lpServiceName, 1021 lpDisplayName, 1022 lpcchBuffer)); 1023 1024 if(!lpServiceName || !lpDisplayName) { 1025 SetLastError(ERROR_INVALID_PARAMETER); 1026 return FALSE; 1027 } 1028 if(CheckServiceHandle(hSCManager) == FALSE) { 1029 SetLastError(ERROR_INVALID_PARAMETER); 1030 return FALSE; 1031 } 1032 1033 if(RegOpenKeyW((HKEY)hSCManager, lpServiceName, &keyThisService) != 0) { 1034 SetLastError(ERROR_SERVICE_DOES_NOT_EXIST); 1035 return FALSE; 1036 } 1037 size = *lpcchBuffer; 1038 type = REG_SZ; 1039 if(RegQueryValueExW(keyThisService, REG_SERVICE_DISPLAYNAME_W, 0, &type, (LPBYTE)lpDisplayName, &size) == ERROR_MORE_DATA) 1040 { 1041 SetLastError(ERROR_MORE_DATA); 1042 *lpcchBuffer = size; 1043 return FALSE; 1044 } 1045 *lpcchBuffer = size; 1046 RegCloseKey(keyThisService); 1047 return TRUE; 787 1048 } 788 1049 … … 807 1068 *****************************************************************************/ 808 1069 809 #define LPENUM_SERVICE_STATUS LPVOID810 1070 BOOL WIN32API EnumDependentServicesA(SC_HANDLE hService, 811 1071 DWORD dwServiceState, 812 LPENUM_SERVICE_STATUS lpServices,1072 LPENUM_SERVICE_STATUSA lpServices, 813 1073 DWORD cbBufSize, 814 1074 LPDWORD pcbBytesNeeded, … … 849 1109 BOOL WIN32API EnumDependentServicesW(SC_HANDLE hService, 850 1110 DWORD dwServiceState, 851 LPENUM_SERVICE_STATUS lpServices,1111 LPENUM_SERVICE_STATUSW lpServices, 852 1112 DWORD cbBufSize, 853 1113 LPDWORD pcbBytesNeeded, … … 889 1149 DWORD dwServiceType, 890 1150 DWORD dwServiceState, 891 LPENUM_SERVICE_STATUS lpServices,1151 LPENUM_SERVICE_STATUSA lpServices, 892 1152 DWORD cbBufSize, 893 1153 LPDWORD pcbBytesNeeded, … … 932 1192 DWORD dwServiceType, 933 1193 DWORD dwServiceState, 934 LPENUM_SERVICE_STATUS lpServices,1194 LPENUM_SERVICE_STATUSW lpServices, 935 1195 DWORD cbBufSize, 936 1196 LPDWORD pcbBytesNeeded, … … 952 1212 953 1213 /***************************************************************************** 954 * Name : GetServiceDisplayNameA955 * Purpose : The GetServiceDisplayName function obtains the display name that956 * is associated with a particular service name. The service name957 * is the same as the service's registry key name.958 * Parameters: SC_HANDLE hSCManager handle to a service control manager database959 * LPCSTR lpServiceName the service name960 * LPTSTR lpDisplayName buffer to receive the service's display name961 * LPDWORD lpcchBuffer size of display name buffer and display name962 * Variables :963 * Result :964 * Remark :965 * Status : UNTESTED STUB966 *967 * Author : Patrick Haller [Tue, 1998/06/16 23:00]968 *****************************************************************************/969 970 BOOL WIN32API GetServiceDisplayNameA(SC_HANDLE hSCManager,971 LPCSTR lpServiceName,972 LPTSTR lpDisplayName,973 LPDWORD lpcchBuffer)974 {975 dprintf(("ADVAPI32: GetServiceDisplayNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",976 hSCManager,977 lpServiceName,978 lpDisplayName,979 lpcchBuffer));980 981 return (FALSE); /* signal failure */982 }983 984 985 /*****************************************************************************986 * Name : GetServiceDisplayNameW987 * Purpose : The GetServiceDisplayName function obtains the display name that988 * is associated with a particular service name. The service name989 * is the same as the service's registry key name.990 * Parameters: SC_HANDLE hSCManager handle to a service control manager database991 * LPCWSTR lpServiceName the service name992 * LPWSTR lpDisplayName buffer to receive the service's display name993 * LPDWORD lpcchBuffer size of display name buffer and display name994 * Variables :995 * Result :996 * Remark :997 * Status : UNTESTED STUB998 *999 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1000 *****************************************************************************/1001 1002 BOOL WIN32API GetServiceDisplayNameW(SC_HANDLE hSCManager,1003 LPCWSTR lpServiceName,1004 LPWSTR lpDisplayName,1005 LPDWORD lpcchBuffer)1006 {1007 dprintf(("ADVAPI32: GetServiceDisplayNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",1008 hSCManager,1009 lpServiceName,1010 lpDisplayName,1011 lpcchBuffer));1012 1013 return (FALSE); /* signal failure */1014 }1015 1016 /*****************************************************************************1017 1214 * Name : GetServiceKeyNameA 1018 1215 * Purpose : The GetServiceKeyName function obtains the service name that is … … 1094 1291 hSCManager)); 1095 1292 1096 return (ERROR_ACCESS_DENIED); /* signal failure */1293 return 0; /* signal failure */ 1097 1294 } 1098 1295 … … 1119 1316 } 1120 1317 1121 /***************************************************************************** 1122 * Name : StartServiceA 1123 * Purpose : The StartService function starts the execution of a service. 1124 * Parameters: SC_HANDLE schService handle of service 1125 * DWORD dwNumServiceArgs number of arguments 1126 * LPCSTR *lpszServiceArgs address of array of argument string pointers 1127 * Variables : 1128 * Result : 1129 * Remark : 1130 * Status : UNTESTED STUB 1131 * 1132 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 1133 *****************************************************************************/ 1134 1135 BOOL WIN32API StartServiceA(SC_HANDLE schService, 1136 DWORD dwNumServiceArgs, 1137 LPCSTR *lpszServiceArgs) 1138 { 1139 dprintf(("ADVAPI32: StartServiceA(%08xh,%08xh,%s) not implemented.\n", 1140 schService, 1141 dwNumServiceArgs, 1142 lpszServiceArgs)); 1143 1144 return (FALSE); /* signal failure */ 1145 } 1146 1147 /***************************************************************************** 1148 * Name : StartServiceW 1149 * Purpose : The StartService function starts the execution of a service. 1150 * Parameters: SC_HANDLE schService handle of service 1151 * DWORD dwNumServiceArgs number of arguments 1152 * LPCWSTR *lpszServiceArgs address of array of argument string pointers 1153 * Variables : 1154 * Result : 1155 * Remark : 1156 * Status : UNTESTED STUB 1157 * 1158 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 1159 *****************************************************************************/ 1160 1161 BOOL WIN32API StartServiceW(SC_HANDLE schService, 1162 DWORD dwNumServiceArgs, 1163 LPCWSTR *lpszServiceArgs) 1164 { 1165 dprintf(("ADVAPI32: StartServiceW(%08xh,%08xh,%s) not implemented.\n", 1166 schService, 1167 dwNumServiceArgs, 1168 lpszServiceArgs)); 1169 1170 return (FALSE); /* signal failure */ 1171 } 1172 1318
Note:
See TracChangeset
for help on using the changeset viewer.