Changeset 12727


Ignore:
Timestamp:
Dec 19, 1999, 8:53:37 PM (25 years ago)
Author:
sandervl
Message:

Moved Service apis into separate sourcefile

Location:
tags/trunk/src/advapi32
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/advapi32/ADVAPI32.CPP

    r12480 r12727  
    1 /* $Id: ADVAPI32.CPP,v 1.9 1999-11-30 19:41:06 sandervl Exp $ */
     1/* $Id: ADVAPI32.CPP,v 1.10 1999-12-19 19:53:36 sandervl Exp $ */
    22
    33/*
     
    635635
    636636/*****************************************************************************
    637  * Name      : ChangeServiceConfigA
    638  * Purpose   : The ChangeServiceConfig function changes the configuration
    639  *             parameters of a service.
    640  * Parameters: SC_HANDLE hService           handle of service
    641  *             DWORD     dwServiceType      type of service
    642  *             DWORD     dwStartType        when to start service
    643  *             DWORD     dwErrorControl     severity if service fails to start
    644  *             LPCSTR   lpBinaryPathName   address of service binary file name
    645  *             LPCSTR   lpLoadOrderGroup   address of load ordering group name
    646  *             LPDWORD   lpdwTagId          address of variable to get tag identifier
    647  *             LPCSTR   lpDependencies     address of array of dependency names
    648  *             LPCSTR   lpServiceStartName address of account name of service
    649  *             LPCSTR   lpPassword         address of password for service account
    650  *             LPCSTR   lpDisplayName      address of display name
    651  * Variables :
    652  * Result    :
    653  * Remark    :
    654  * Status    : UNTESTED STUB
    655  *
    656  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    657  *****************************************************************************/
    658 
    659 #define SC_HANDLE HANDLE
    660 BOOL WIN32API ChangeServiceConfigA(SC_HANDLE hService,
    661                                       DWORD     dwServiceType,
    662                                       DWORD     dwStartType,
    663                                       DWORD     dwErrorControl,
    664                                       LPCSTR   lpBinaryPathName,
    665                                       LPCSTR   lpLoadOrderGroup,
    666                                       LPDWORD   lpdwTagId,
    667                                       LPCSTR   lpDependencies,
    668                                       LPCSTR   lpServiceStartName,
    669                                       LPCSTR   lpPassword,
    670                                       LPCSTR   lpDisplayName)
    671 {
    672   dprintf(("ADVAPI32: ChangeServiceConfigA(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n",
    673            hService,
    674            dwServiceType,
    675            dwStartType,
    676            dwErrorControl,
    677            lpBinaryPathName,
    678            lpLoadOrderGroup,
    679            lpdwTagId,
    680            lpDependencies,
    681            lpServiceStartName,
    682            lpPassword,
    683            lpDisplayName));
    684 
    685   return (FALSE); /* signal failure */
    686 }
    687 
    688 
    689 /*****************************************************************************
    690  * Name      : ChangeServiceConfigW
    691  * Purpose   : The ChangeServiceConfig function changes the configuration
    692  *             parameters of a service.
    693  * Parameters: SC_HANDLE hService           handle of service
    694  *             DWORD     dwServiceType      type of service
    695  *             DWORD     dwStartType        when to start service
    696  *             DWORD     dwErrorControl     severity if service fails to start
    697  *             LPCWSTR   lpBinaryPathName   address of service binary file name
    698  *             LPCWSTR   lpLoadOrderGroup   address of load ordering group name
    699  *             LPDWORD   lpdwTagId          address of variable to get tag identifier
    700  *             LPCWSTR   lpDependencies     address of array of dependency names
    701  *             LPCWSTR   lpServiceStartName address of account name of service
    702  *             LPCWSTR   lpPassword         address of password for service account
    703  *             LPCWSTR   lpDisplayName      address of display name
    704  * Variables :
    705  * Result    :
    706  * Remark    :
    707  * Status    : UNTESTED STUB
    708  *
    709  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    710  *****************************************************************************/
    711 
    712 BOOL WIN32API ChangeServiceConfigW(SC_HANDLE hService,
    713                                       DWORD     dwServiceType,
    714                                       DWORD     dwStartType,
    715                                       DWORD     dwErrorControl,
    716                                       LPCWSTR   lpBinaryPathName,
    717                                       LPCWSTR   lpLoadOrderGroup,
    718                                       LPDWORD   lpdwTagId,
    719                                       LPCWSTR   lpDependencies,
    720                                       LPCWSTR   lpServiceStartName,
    721                                       LPCWSTR   lpPassword,
    722                                       LPCWSTR   lpDisplayName)
    723 {
    724   dprintf(("ADVAPI32: ChangeServiceConfigW(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n",
    725            hService,
    726            dwServiceType,
    727            dwStartType,
    728            dwErrorControl,
    729            lpBinaryPathName,
    730            lpLoadOrderGroup,
    731            lpdwTagId,
    732            lpDependencies,
    733            lpServiceStartName,
    734            lpPassword,
    735            lpDisplayName));
    736 
    737   return (FALSE); /* signal failure */
    738 }
    739 
    740 
    741 /*****************************************************************************
    742637 * Name      : ClearEventLogA
    743638 * Purpose   : The ClearEventLog function clears the specified event log, and
     
    810705
    811706
    812 /*****************************************************************************
    813  * Name      : CloseServiceHandle
    814  * Purpose   : The CloseServiceHandle function closes a handle to a service
    815  *             control manager database as returned by the OpenSCManager function,
    816  *             or it closes a handle to a service object as returned by either
    817  *             the OpenService or CreateService function.
    818  * Parameters: SC_HANDLE  hSCObject  handle of service or service control manager database
    819  * Variables :
    820  * Result    :
    821  * Remark    :
    822  * Status    : UNTESTED STUB
    823  *
    824  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    825  *****************************************************************************/
    826 
    827 BOOL WIN32API CloseServiceHandle(SC_HANDLE hSCObject)
    828 {
    829   dprintf(("ADVAPI32: CloseServiceHandle(%08xh) not implemented.\n",
    830            hSCObject));
    831 
    832   return (FALSE); /* signal failure */
    833 }
    834 
    835 
    836 /*****************************************************************************
    837  * Name      : ControlService
    838  * Purpose   : The ControlService function sends a control code to a Win32 service.
    839  * Parameters: SC_HANDLE        hService        handle of service
    840  *             DWORD            dwControl       control code
    841  *             LPSERVICE_STATUS lpServiceStatus address of service status structure
    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 ControlService(SC_HANDLE        hService,
    851                                 DWORD            dwControl,
    852                                 LPSERVICE_STATUS lpServiceStatus)
    853 {
    854   dprintf(("ADVAPI32: ControlService(%08xh,%08xh,%08xh) not implemented.\n",
    855            hService,
    856            dwControl,
    857            lpServiceStatus));
    858 
    859   return (FALSE); /* signal failure */
    860 }
    861707
    862708
     
    1014860
    1015861
    1016 /*****************************************************************************
    1017  * Name      : CreateServiceA
    1018  * Purpose   : The CreateService function creates a service object and adds it
    1019  *             to the specified service control manager database.
    1020  * Parameters: SC_HANDLE hSCManager         handle of service control manager database
    1021  *             LPCSTR   lpServiceName      address of name of service to start
    1022  *             LPCSTR   lpDisplayName      address of display name
    1023  *             DWORD     dwDesiredAccess    type of access to service
    1024  *             DWORD     dwServiceType      type of service
    1025  *             DWORD     dwStartType        when to start service
    1026  *             DWORD     dwErrorControl     severity if service fails to start
    1027  *             LPCSTR   lpBinaryPathName   address of name of binary file
    1028  *             LPCSTR   lpLoadOrderGroup   address of name of load ordering group
    1029  *             LPDWORD   lpdwTagId          address of variable to get tag identifier
    1030  *             LPCSTR   lpDependencies     address of array of dependency names
    1031  *             LPCSTR   lpServiceStartName address of account name of service
    1032  *             LPCSTR   lpPassword         address of password for service account
    1033  * Variables :
    1034  * Result    :
    1035  * Remark    :
    1036  * Status    : UNTESTED STUB
    1037  *
    1038  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1039  *****************************************************************************/
    1040 
    1041 SC_HANDLE WIN32API CreateServiceA(SC_HANDLE hSCManager,
    1042                                      LPCSTR   lpServiceName,
    1043                                      LPCSTR   lpDisplayName,
    1044                                      DWORD     dwDesiredAccess,
    1045                                      DWORD     dwServiceType,
    1046                                      DWORD     dwStartType,
    1047                                      DWORD     dwErrorControl,
    1048                                      LPCSTR   lpBinaryPathName,
    1049                                      LPCSTR   lpLoadOrderGroup,
    1050                                      LPDWORD   lpdwTagId,
    1051                                      LPCSTR   lpDependencies,
    1052                                      LPCSTR   lpServiceStartName,
    1053                                      LPCSTR   lpPassword)
    1054 {
    1055   dprintf(("ADVAPI32: CreateServiceA(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s) not implemented.\n",
    1056            hSCManager,
    1057            lpServiceName,
    1058            lpDisplayName,
    1059            dwDesiredAccess,
    1060            dwServiceType,
    1061            dwStartType,
    1062            dwErrorControl,
    1063            lpBinaryPathName,
    1064            lpLoadOrderGroup,
    1065            lpdwTagId,
    1066            lpDependencies,
    1067            lpServiceStartName,
    1068            lpPassword));
    1069 
    1070   return (NULL); /* signal failure */
    1071 }
    1072 
    1073 
    1074 /*****************************************************************************
    1075  * Name      : CreateServiceW
    1076  * Purpose   : The CreateService function creates a service object and adds it
    1077  *             to the specified service control manager database.
    1078  * Parameters: SC_HANDLE hSCManager         handle of service control manager database
    1079  *             LPCWSTR   lpServiceName      address of name of service to start
    1080  *             LPCWSTR   lpDisplayName      address of display name
    1081  *             DWORD     dwDesiredAccess    type of access to service
    1082  *             DWORD     dwServiceType      type of service
    1083  *             DWORD     dwStartType        when to start service
    1084  *             DWORD     dwErrorControl     severity if service fails to start
    1085  *             LPCWSTR   lpBinaryPathName   address of name of binary file
    1086  *             LPCWSTR   lpLoadOrderGroup   address of name of load ordering group
    1087  *             LPDWORD   lpdwTagId          address of variable to get tag identifier
    1088  *             LPCWSTR   lpDependencies     address of array of dependency names
    1089  *             LPCWSTR   lpServiceStartName address of account name of service
    1090  *             LPCWSTR   lpPassword         address of password for service account
    1091  * Variables :
    1092  * Result    :
    1093  * Remark    :
    1094  * Status    : UNTESTED STUB
    1095  *
    1096  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1097  *****************************************************************************/
    1098 
    1099 SC_HANDLE WIN32API CreateServiceW(SC_HANDLE hSCManager,
    1100                                      LPCWSTR   lpServiceName,
    1101                                      LPCWSTR   lpDisplayName,
    1102                                      DWORD     dwDesiredAccess,
    1103                                      DWORD     dwServiceType,
    1104                                      DWORD     dwStartType,
    1105                                      DWORD     dwErrorControl,
    1106                                      LPCWSTR   lpBinaryPathName,
    1107                                      LPCWSTR   lpLoadOrderGroup,
    1108                                      LPDWORD   lpdwTagId,
    1109                                      LPCWSTR   lpDependencies,
    1110                                      LPCWSTR   lpServiceStartName,
    1111                                      LPCWSTR   lpPassword)
    1112 {
    1113   dprintf(("ADVAPI32: CreateServiceW(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s) not implemented.\n",
    1114            hSCManager,
    1115            lpServiceName,
    1116            lpDisplayName,
    1117            dwDesiredAccess,
    1118            dwServiceType,
    1119            dwStartType,
    1120            dwErrorControl,
    1121            lpBinaryPathName,
    1122            lpLoadOrderGroup,
    1123            lpdwTagId,
    1124            lpDependencies,
    1125            lpServiceStartName,
    1126            lpPassword));
    1127 
    1128   return (NULL); /* signal failure */
    1129 }
    1130 
    1131862
    1132863/*****************************************************************************
     
    1154885}
    1155886
    1156 
    1157 /*****************************************************************************
    1158  * Name      : DeleteService
    1159  * Purpose   : The DeleteService function marks the specified service for
    1160  *             deletion from the service control manager database.
    1161  * Parameters: SC_HANDLE  hService  handle of service
    1162  * Variables :
    1163  * Result    :
    1164  * Remark    :
    1165  * Status    : UNTESTED STUB
    1166  *
    1167  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1168  *****************************************************************************/
    1169 
    1170 BOOL WIN32API DeleteService(SC_HANDLE hService)
    1171 {
    1172   dprintf(("ADVAPI32: DeleteService(%08xh) not implemented.\n",
    1173            hService));
    1174 
    1175   return (FALSE); /* signal failure */
    1176 }
    1177887
    1178888
     
    1226936  return (FALSE); /* signal failure */
    1227937}
    1228 
    1229 
    1230 /*****************************************************************************
    1231  * Name      : EnumDependentServicesA
    1232  * Purpose   : The EnumDependentServices function enumerates services that
    1233  *             depend on another specified service; that is, the specified
    1234  *             service must be running before the enumerated services can run.
    1235  *             The name and status of each dependent service are provided.
    1236  * Parameters: SC_HANDLE             hService           handle of service
    1237  *             DWORD                 dwServiceState     state of services to enumerate
    1238  *             LPENUM_SERVICE_STATUS lpServices         address of service status buffer
    1239  *             DWORD                 cbBufSize          size of service status buffer
    1240  *             LPDWORD               pcbBytesNeeded     address of variable for bytes needed
    1241  *             LPDWORD               lpServicesReturned address of variable for number returned
    1242  * Variables :
    1243  * Result    :
    1244  * Remark    :
    1245  * Status    : UNTESTED STUB
    1246  *
    1247  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1248  *****************************************************************************/
    1249 
    1250 #define LPENUM_SERVICE_STATUS LPVOID
    1251 BOOL WIN32API EnumDependentServicesA(SC_HANDLE             hService,
    1252                                         DWORD                 dwServiceState,
    1253                                         LPENUM_SERVICE_STATUS lpServices,
    1254                                         DWORD                 cbBufSize,
    1255                                         LPDWORD               pcbBytesNeeded,
    1256                                         LPDWORD               lpServicesReturned)
    1257 {
    1258   dprintf(("ADVAPI32: EnumDependentServicesA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1259            hService,
    1260            dwServiceState,
    1261            lpServices,
    1262            cbBufSize,
    1263            pcbBytesNeeded,
    1264            lpServicesReturned));
    1265 
    1266   return (FALSE); /* signal failure */
    1267 }
    1268 
    1269 
    1270 /*****************************************************************************
    1271  * Name      : EnumDependentServicesW
    1272  * Purpose   : The EnumDependentServices function enumerates services that
    1273  *             depend on another specified service; that is, the specified
    1274  *             service must be running before the enumerated services can run.
    1275  *             The name and status of each dependent service are provided.
    1276  * Parameters: SC_HANDLE             hService           handle of service
    1277  *             DWORD                 dwServiceState     state of services to enumerate
    1278  *             LPENUM_SERVICE_STATUS lpServices         address of service status buffer
    1279  *             DWORD                 cbBufSize          size of service status buffer
    1280  *             LPDWORD               pcbBytesNeeded     address of variable for bytes needed
    1281  *             LPDWORD               lpServicesReturned address of variable for number returned
    1282  * Variables :
    1283  * Result    :
    1284  * Remark    :
    1285  * Status    : UNTESTED STUB
    1286  *
    1287  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1288  *****************************************************************************/
    1289 
    1290 BOOL WIN32API EnumDependentServicesW(SC_HANDLE             hService,
    1291                                         DWORD                 dwServiceState,
    1292                                         LPENUM_SERVICE_STATUS lpServices,
    1293                                         DWORD                 cbBufSize,
    1294                                         LPDWORD               pcbBytesNeeded,
    1295                                         LPDWORD               lpServicesReturned)
    1296 {
    1297   dprintf(("ADVAPI32: EnumDependentServicesW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1298            hService,
    1299            dwServiceState,
    1300            lpServices,
    1301            cbBufSize,
    1302            pcbBytesNeeded,
    1303            lpServicesReturned));
    1304 
    1305   return (FALSE); /* signal failure */
    1306 }
    1307 
    1308 
    1309 /*****************************************************************************
    1310  * Name      : EnumServicesStatusA
    1311  * Purpose   : The EnumServicesStatus function enumerates services in the specified
    1312  *             service control manager database. The name and status of each service are provided.
    1313  * Parameters: SC_HANDLE             hSCManager          handle of service control manager database
    1314  *             DWORD                 dwServiceType       type of services to enumerate
    1315  *             DWORD                 dwServiceState      state of services to enumerate
    1316  *             LPENUM_SERVICE_STATUS lpServices          address of service status buffer
    1317  *             DWORD                 cbBufSize           size of service status buffer
    1318  *             LPDWORD               pcbBytesNeeded      address of variable for bytes needed
    1319  *             LPDWORD               lpServicesReturned  address of variable for number returned
    1320  *             LPDWORD               lpResumeHandle      address of variable for next entry
    1321  * Variables :
    1322  * Result    :
    1323  * Remark    :
    1324  * Status    : UNTESTED STUB
    1325  *
    1326  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1327  *****************************************************************************/
    1328 
    1329 BOOL WIN32API EnumServicesStatusA(SC_HANDLE             hSCManager,
    1330                                      DWORD                 dwServiceType,
    1331                                      DWORD                 dwServiceState,
    1332                                      LPENUM_SERVICE_STATUS lpServices,
    1333                                      DWORD                 cbBufSize,
    1334                                      LPDWORD               pcbBytesNeeded,
    1335                                      LPDWORD               lpServicesReturned,
    1336                                      LPDWORD               lpResumeHandle)
    1337 {
    1338   dprintf(("ADVAPI32: EnumServicesStatusA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1339            hSCManager,
    1340            dwServiceType,
    1341            dwServiceState,
    1342            lpServices,
    1343            cbBufSize,
    1344            pcbBytesNeeded,
    1345            lpServicesReturned,
    1346            lpResumeHandle));
    1347 
    1348   return (FALSE); /* signal failure */
    1349 }
    1350 
    1351 
    1352 /*****************************************************************************
    1353  * Name      : EnumServicesStatusW
    1354  * Purpose   : The EnumServicesStatus function enumerates services in the specified
    1355  *             service control manager database. The name and status of each service are provided.
    1356  * Parameters: SC_HANDLE             hSCManager          handle of service control manager database
    1357  *             DWORD                 dwServiceType       type of services to enumerate
    1358  *             DWORD                 dwServiceState      state of services to enumerate
    1359  *             LPENUM_SERVICE_STATUS lpServices          address of service status buffer
    1360  *             DWORD                 cbBufSize           size of service status buffer
    1361  *             LPDWORD               pcbBytesNeeded      address of variable for bytes needed
    1362  *             LPDWORD               lpServicesReturned  address of variable for number returned
    1363  *             LPDWORD               lpResumeHandle      address of variable for next entry
    1364  * Variables :
    1365  * Result    :
    1366  * Remark    :
    1367  * Status    : UNTESTED STUB
    1368  *
    1369  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1370  *****************************************************************************/
    1371 
    1372 BOOL WIN32API EnumServicesStatusW(SC_HANDLE             hSCManager,
    1373                                      DWORD                 dwServiceType,
    1374                                      DWORD                 dwServiceState,
    1375                                      LPENUM_SERVICE_STATUS lpServices,
    1376                                      DWORD                 cbBufSize,
    1377                                      LPDWORD               pcbBytesNeeded,
    1378                                      LPDWORD               lpServicesReturned,
    1379                                      LPDWORD               lpResumeHandle)
    1380 {
    1381   dprintf(("ADVAPI32: EnumServicesStatusW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1382            hSCManager,
    1383            dwServiceType,
    1384            dwServiceState,
    1385            lpServices,
    1386            cbBufSize,
    1387            pcbBytesNeeded,
    1388            lpServicesReturned,
    1389            lpResumeHandle));
    1390 
    1391   return (FALSE); /* signal failure */
    1392 }
    1393 
    1394 
    1395938
    1396939/*****************************************************************************
     
    15971140}
    15981141
    1599 
    1600 /*****************************************************************************
    1601  * Name      : GetServiceDisplayNameA
    1602  * Purpose   : The GetServiceDisplayName function obtains the display name that
    1603  *             is associated with a particular service name. The service name
    1604  *             is the same as the service's registry key name.
    1605  * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
    1606  *             LPCSTR   lpServiceName  the service name
    1607  *             LPTSTR    lpDisplayName  buffer to receive the service's display name
    1608  *             LPDWORD   lpcchBuffer    size of display name buffer and display name
    1609  * Variables :
    1610  * Result    :
    1611  * Remark    :
    1612  * Status    : UNTESTED STUB
    1613  *
    1614  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1615  *****************************************************************************/
    1616 
    1617 BOOL WIN32API GetServiceDisplayNameA(SC_HANDLE hSCManager,
    1618                                         LPCSTR   lpServiceName,
    1619                                         LPTSTR    lpDisplayName,
    1620                                         LPDWORD   lpcchBuffer)
    1621 {
    1622   dprintf(("ADVAPI32: GetServiceDisplayNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1623            hSCManager,
    1624            lpServiceName,
    1625            lpDisplayName,
    1626            lpcchBuffer));
    1627 
    1628   return (FALSE); /* signal failure */
    1629 }
    1630 
    1631 
    1632 /*****************************************************************************
    1633  * Name      : GetServiceDisplayNameW
    1634  * Purpose   : The GetServiceDisplayName function obtains the display name that
    1635  *             is associated with a particular service name. The service name
    1636  *             is the same as the service's registry key name.
    1637  * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
    1638  *             LPCWSTR   lpServiceName  the service name
    1639  *             LPWSTR    lpDisplayName  buffer to receive the service's display name
    1640  *             LPDWORD   lpcchBuffer    size of display name buffer and display name
    1641  * Variables :
    1642  * Result    :
    1643  * Remark    :
    1644  * Status    : UNTESTED STUB
    1645  *
    1646  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1647  *****************************************************************************/
    1648 
    1649 BOOL WIN32API GetServiceDisplayNameW(SC_HANDLE hSCManager,
    1650                                         LPCWSTR   lpServiceName,
    1651                                         LPWSTR    lpDisplayName,
    1652                                         LPDWORD   lpcchBuffer)
    1653 {
    1654   dprintf(("ADVAPI32: GetServiceDisplayNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1655            hSCManager,
    1656            lpServiceName,
    1657            lpDisplayName,
    1658            lpcchBuffer));
    1659 
    1660   return (FALSE); /* signal failure */
    1661 }
    1662 
    1663 
    1664 /*****************************************************************************
    1665  * Name      : GetServiceKeyNameA
    1666  * Purpose   : The GetServiceKeyName function obtains the service name that is
    1667  *             associated with a particular service's display name. The service
    1668  *             name is the same as the service's registry key name.
    1669  * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
    1670  *             LPCSTR   lpDisplayName  the service's display name
    1671  *             LPTSTR    lpServiceName  buffer to receive the service name
    1672  *             LPDWORD   lpcchBuffer    size of service name buffer and service name
    1673  * Variables :
    1674  * Result    :
    1675  * Remark    :
    1676  * Status    : UNTESTED STUB
    1677  *
    1678  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1679  *****************************************************************************/
    1680 
    1681 BOOL WIN32API GetServiceKeyNameA(SC_HANDLE hSCManager,
    1682                                     LPCSTR   lpDisplayName,
    1683                                     LPTSTR    lpServiceName,
    1684                                     LPDWORD   lpcchBuffer)
    1685 {
    1686   dprintf(("ADVAPI32: GetServiceKeyNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1687            hSCManager,
    1688            lpDisplayName,
    1689            lpServiceName,
    1690            lpcchBuffer));
    1691 
    1692   return (FALSE); /* signal failure */
    1693 }
    1694 
    1695 
    1696 /*****************************************************************************
    1697  * Name      : GetServiceKeyNameW
    1698  * Purpose   : The GetServiceKeyName function obtains the service name that is
    1699  *             associated with a particular service's display name. The service
    1700  *             name is the same as the service's registry key name.
    1701  * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
    1702  *             LPCWSTR   lpDisplayName  the service's display name
    1703  *             LPWSTR    lpServiceName  buffer to receive the service name
    1704  *             LPDWORD   lpcchBuffer    size of service name buffer and service name
    1705  * Variables :
    1706  * Result    :
    1707  * Remark    :
    1708  * Status    : UNTESTED STUB
    1709  *
    1710  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1711  *****************************************************************************/
    1712 
    1713 BOOL WIN32API GetServiceKeyNameW(SC_HANDLE hSCManager,
    1714                                     LPCWSTR   lpDisplayName,
    1715                                     LPWSTR    lpServiceName,
    1716                                     LPDWORD   lpcchBuffer)
    1717 {
    1718   dprintf(("ADVAPI32: GetServiceKeyNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1719            hSCManager,
    1720            lpDisplayName,
    1721            lpServiceName,
    1722            lpcchBuffer));
    1723 
    1724   return (FALSE); /* signal failure */
    1725 }
    17261142
    17271143/*****************************************************************************
     
    19231339
    19241340  return (TRUE); /* signal OK */
    1925 }
    1926 
    1927 /*****************************************************************************
    1928  * Name      : LockServiceDatabase
    1929  * Purpose   : The LockServiceDatabase function locks a specified database.
    1930  * Parameters: SC_HANDLE  hSCManager  handle of service control manager database
    1931  * Variables :
    1932  * Result    :
    1933  * Remark    :
    1934  * Status    : UNTESTED STUB
    1935  *
    1936  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1937  *****************************************************************************/
    1938 
    1939 #define SC_LOCK DWORD
    1940 SC_LOCK WIN32API LockServiceDatabase(SC_HANDLE hSCManager)
    1941 {
    1942   dprintf(("ADVAPI32: LockServiceDatabase(%08xh) not implemented.\n",
    1943            hSCManager));
    1944 
    1945   return (ERROR_ACCESS_DENIED); /* signal failure */
    19461341}
    19471342
     
    27052100
    27062101
    2707 /*****************************************************************************
    2708  * Name      : OpenSCManagerA
    2709  * Purpose   : The OpenSCManager function establishes a connection to the
    2710  *             service control manager on the specified computer and opens the
    2711  *             specified database.
    2712  * Parameters: LPCSTR lpszMachineName   address of machine name string
    2713  *             LPCSTR lpszDatabaseName  address of database name string
    2714  *             DWORD   fdwDesiredAccess  type of access
    2715  * Variables :
    2716  * Result    :
    2717  * Remark    :
    2718  * Status    : UNTESTED STUB
    2719  *
    2720  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2721  *****************************************************************************/
    2722 
    2723 SC_HANDLE WIN32API OpenSCManagerA(LPCSTR lpszMachineName,
    2724                                      LPCSTR lpszDatabaseName,
    2725                                      DWORD   fdwDesiredAccess)
    2726 {
    2727   dprintf(("ADVAPI32: OpenSCManagerA(%s,%s,%x) not implemented.\n",
    2728            lpszMachineName,
    2729            lpszDatabaseName,
    2730            fdwDesiredAccess));
    2731 
    2732   return (NULL); /* signal failure */
    2733 }
    2734 
    2735 
    2736 /*****************************************************************************
    2737  * Name      : OpenSCManagerW
    2738  * Purpose   : The OpenSCManager function establishes a connection to the
    2739  *             service control manager on the specified computer and opens the
    2740  *             specified database.
    2741  * Parameters: LPCWSTR lpszMachineName   address of machine name string
    2742  *             LPCWSTR lpszDatabaseName  address of database name string
    2743  *             DWORD   fdwDesiredAccess  type of access
    2744  * Variables :
    2745  * Result    :
    2746  * Remark    :
    2747  * Status    : UNTESTED STUB
    2748  *
    2749  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2750  *****************************************************************************/
    2751 
    2752 SC_HANDLE WIN32API OpenSCManagerW(LPCWSTR lpszMachineName,
    2753                                      LPCWSTR lpszDatabaseName,
    2754                                      DWORD   fdwDesiredAccess)
    2755 {
    2756   dprintf(("ADVAPI32: OpenSCManagerW(%x,%x,%x) not implemented.\n",
    2757            lpszMachineName,
    2758            lpszDatabaseName,
    2759            fdwDesiredAccess));
    2760 
    2761   return (NULL); /* signal failure */
    2762 }
    2763 
    2764 
    2765 /*****************************************************************************
    2766  * Name      : OpenServiceA
    2767  * Purpose   : The OpenService function opens a handle to an existing service.
    2768  * Parameters: SC_HANDLE schSCManager      handle of service control manager database
    2769  *             LPCSTR   lpszServiceName   address of name of service to start
    2770  *             DWORD     fdwDesiredAccess  type of access to service
    2771  * Variables :
    2772  * Result    :
    2773  * Remark    :
    2774  * Status    : UNTESTED STUB
    2775  *
    2776  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2777  *****************************************************************************/
    2778 
    2779 SC_HANDLE WIN32API OpenServiceA(SC_HANDLE schSCManager,
    2780                                    LPCSTR   lpszServiceName,
    2781                                    DWORD     fdwDesiredAccess)
    2782 {
    2783   dprintf(("ADVAPI32: OpenServiceA(%08xh,%s,%08xh) not implemented.\n",
    2784            schSCManager,
    2785            lpszServiceName,
    2786            fdwDesiredAccess));
    2787 
    2788   return (NULL); /* signal failure */
    2789 }
    2790 
    2791 
    2792 /*****************************************************************************
    2793  * Name      : OpenServiceW
    2794  * Purpose   : The OpenService function opens a handle to an existing service.
    2795  * Parameters: SC_HANDLE schSCManager      handle of service control manager database
    2796  *             LPCWSTR   lpszServiceName   address of name of service to start
    2797  *             DWORD     fdwDesiredAccess  type of access to service
    2798  * Variables :
    2799  * Result    :
    2800  * Remark    :
    2801  * Status    : UNTESTED STUB
    2802  *
    2803  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2804  *****************************************************************************/
    2805 
    2806 SC_HANDLE WIN32API OpenServiceW(SC_HANDLE schSCManager,
    2807                                    LPCWSTR   lpszServiceName,
    2808                                    DWORD     fdwDesiredAccess)
    2809 {
    2810   dprintf(("ADVAPI32: OpenServiceW(%08xh,%s,%08xh) not implemented.\n",
    2811            schSCManager,
    2812            lpszServiceName,
    2813            fdwDesiredAccess));
    2814 
    2815   return (NULL); /* signal failure */
    2816 }
    2817 
    28182102
    28192103/*****************************************************************************
     
    29172201
    29182202
    2919 /*****************************************************************************
    2920  * Name      : QueryServiceConfigA
    2921  * Purpose   : The QueryServiceConfig function retrieves the configuration
    2922  *             parameters of the specified service.
    2923  * Parameters: SC_HANDLE              schService       handle of service
    2924  *             LPQUERY_SERVICE_CONFIG lpqscServConfig  address of service config. structure
    2925  *             DWORD                  cbBufSize        size of service configuration buffer
    2926  *             LPDWORD                lpcbBytesNeeded  address of variable for bytes needed
    2927  * Variables :
    2928  * Result    :
    2929  * Remark    :
    2930  * Status    : UNTESTED STUB
    2931  *
    2932  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2933  *****************************************************************************/
    2934 
    2935 #define LPQUERY_SERVICE_CONFIG LPVOID
    2936 BOOL WIN32API QueryServiceConfigA(SC_HANDLE              schService,
    2937                                      LPQUERY_SERVICE_CONFIG lpqscServConfig,
    2938                                      DWORD                  cbBufSize,
    2939                                      LPDWORD                lpcbBytesNeeded)
    2940 {
    2941   dprintf(("ADVAPI32: QueryServiceConfigA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    2942            schService,
    2943            lpqscServConfig,
    2944            cbBufSize,
    2945            lpcbBytesNeeded));
    2946 
    2947   return (FALSE); /* signal failure */
    2948 }
    2949 
    2950 
    2951 /*****************************************************************************
    2952  * Name      : QueryServiceConfigW
    2953  * Purpose   : The QueryServiceConfig function retrieves the configuration
    2954  *             parameters of the specified service.
    2955  * Parameters: SC_HANDLE              schService       handle of service
    2956  *             LPQUERY_SERVICE_CONFIG lpqscServConfig  address of service config. structure
    2957  *             DWORD                  cbBufSize        size of service configuration buffer
    2958  *             LPDWORD                lpcbBytesNeeded  address of variable for bytes needed
    2959  * Variables :
    2960  * Result    :
    2961  * Remark    :
    2962  * Status    : UNTESTED STUB
    2963  *
    2964  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2965  *****************************************************************************/
    2966 
    2967 BOOL WIN32API QueryServiceConfigW(SC_HANDLE              schService,
    2968                                      LPQUERY_SERVICE_CONFIG lpqscServConfig,
    2969                                      DWORD                  cbBufSize,
    2970                                      LPDWORD                lpcbBytesNeeded)
    2971 {
    2972   dprintf(("ADVAPI32: QueryServiceConfigW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    2973            schService,
    2974            lpqscServConfig,
    2975            cbBufSize,
    2976            lpcbBytesNeeded));
    2977 
    2978   return (FALSE); /* signal failure */
    2979 }
    2980 
    2981 
    2982 /*****************************************************************************
    2983  * Name      : QueryServiceLockStatusA
    2984  * Purpose   : The QueryServiceLockStatus function retrieves the lock status
    2985  *             of the specified service control manager database.
    2986  * Parameters: SC_HANDLE                   schSCManager     handle of svc. ctrl. mgr. database
    2987  *             LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat   address of lock status structure
    2988  *             DWORD                       cbBufSize        size of service configuration buffer
    2989  *             LPDWORD                     lpcbBytesNeeded  address of variable for bytes needed
    2990  * Variables :
    2991  * Result    :
    2992  * Remark    :
    2993  * Status    : UNTESTED STUB
    2994  *
    2995  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    2996  *****************************************************************************/
    2997 
    2998 #define LPQUERY_SERVICE_LOCK_STATUS LPVOID
    2999 BOOL WIN32API QueryServiceLockStatusA(SC_HANDLE                   schSCManager,
    3000                                          LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,
    3001                                          DWORD                       cbBufSize,
    3002                                          LPDWORD                     lpcbBytesNeeded)
    3003 {
    3004   dprintf(("ADVAPI32: QueryServiceLockStatusA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    3005            schSCManager,
    3006            lpqslsLockStat,
    3007            cbBufSize,
    3008            lpcbBytesNeeded));
    3009 
    3010   return (FALSE); /* signal failure */
    3011 }
    3012 
    3013 
    3014 /*****************************************************************************
    3015  * Name      : QueryServiceLockStatusW
    3016  * Purpose   : The QueryServiceLockStatus function retrieves the lock status
    3017  *             of the specified service control manager database.
    3018  * Parameters: SC_HANDLE                   schSCManager     handle of svc. ctrl. mgr. database
    3019  *             LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat   address of lock status structure
    3020  *             DWORD                       cbBufSize        size of service configuration buffer
    3021  *             LPDWORD                     lpcbBytesNeeded  address of variable for bytes needed
    3022  * Variables :
    3023  * Result    :
    3024  * Remark    :
    3025  * Status    : UNTESTED STUB
    3026  *
    3027  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3028  *****************************************************************************/
    3029 
    3030 BOOL WIN32API QueryServiceLockStatusW(SC_HANDLE                   schSCManager,
    3031                                          LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,
    3032                                          DWORD                       cbBufSize,
    3033                                          LPDWORD                     lpcbBytesNeeded)
    3034 {
    3035   dprintf(("ADVAPI32: QueryServiceLockStatusW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    3036            schSCManager,
    3037            lpqslsLockStat,
    3038            cbBufSize,
    3039            lpcbBytesNeeded));
    3040 
    3041   return (FALSE); /* signal failure */
    3042 }
    3043 
    3044 
    3045 /*****************************************************************************
    3046  * Name      : QueryServiceObjectSecurity
    3047  * Purpose   : The QueryServiceObjectSecurity function retrieves a copy of the
    3048  *             security descriptor protecting a service object.
    3049  * Parameters: SC_HANDLE             schService       handle of service
    3050  *             SECURITY_INFORMATION  fdwSecurityInfo  type of security information requested
    3051  *             PSECURITY_DESCRIPTOR  psdSecurityDesc  address of security descriptor
    3052  *             DWORD                 cbBufSize        size of security descriptor buffer
    3053  *             LPDWORD               lpcbBytesNeeded  address of variable for bytes needed
    3054  * Variables :
    3055  * Result    :
    3056  * Remark    :
    3057  * Status    : UNTESTED STUB
    3058  *
    3059  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3060  *****************************************************************************/
    3061 
    3062 BOOL WIN32API QueryServiceObjectSecurity(SC_HANDLE             schService,
    3063                                             SECURITY_INFORMATION  fdwSecurityInfo,
    3064                                             PSECURITY_DESCRIPTOR  psdSecurityDesc,
    3065                                             DWORD                 cbBufSize,
    3066                                             LPDWORD               lpcbBytesNeeded)
    3067 {
    3068   dprintf(("ADVAPI32: QueryServiceObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    3069            schService,
    3070            fdwSecurityInfo,
    3071            psdSecurityDesc,
    3072            cbBufSize,
    3073            lpcbBytesNeeded));
    3074 
    3075   return (FALSE); /* signal failure */
    3076 }
    3077 
    3078 
    3079 /*****************************************************************************
    3080  * Name      : QueryServiceStatus
    3081  * Purpose   : The QueryServiceStatus function retrieves the current status of
    3082  *             the specified service.
    3083  * Parameters: SC_HANDLE         schService        handle of service
    3084  *             LPSERVICE_STATUS  lpssServiceStatus address of service status structure
    3085  * Variables :
    3086  * Result    :
    3087  * Remark    :
    3088  * Status    : UNTESTED STUB
    3089  *
    3090  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3091  *****************************************************************************/
    3092 
    3093 BOOL WIN32API QueryServiceStatus(SC_HANDLE         schService,
    3094                                     LPSERVICE_STATUS  lpssServiceStatus)
    3095 {
    3096   dprintf(("ADVAPI32: QueryServiceStatus(%08xh,%08xh) not implemented.\n",
    3097            schService,
    3098            lpssServiceStatus));
    3099 
    3100   return (FALSE); /* signal failure */
    3101 }
    31022203
    31032204
     
    33682469
    33692470
    3370 /*****************************************************************************
    3371  * Name      : SetServiceObjectSecurity
    3372  * Purpose   : The SetServiceObjectSecurity function sets the security
    3373  *             descriptor of a service object.
    3374  * Parameters: SC_HANDLE             schService      handle of service
    3375  *             SECURITY_INFORMATION  fdwSecurityInfo type of security information requested
    3376  *             PSECURITY_DESCRIPTOR  psdSecurityDesc address of security descriptor
    3377  * Variables :
    3378  * Result    :
    3379  * Remark    :
    3380  * Status    : UNTESTED STUB
    3381  *
    3382  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3383  *****************************************************************************/
    3384 
    3385 BOOL WIN32API SetServiceObjectSecurity(SC_HANDLE             schService,
    3386                                           SECURITY_INFORMATION  fdwSecurityInfo,
    3387                                           PSECURITY_DESCRIPTOR  psdSecurityDesc)
    3388 {
    3389   dprintf(("ADVAPI32: SetServiceObjectSecurity(%08xh,%08xh,%08xh) not implemented.\n",
    3390            schService,
    3391            fdwSecurityInfo,
    3392            psdSecurityDesc));
    3393 
    3394   return (FALSE); /* signal failure */
    3395 }
    3396 
    33972471
    33982472/*****************************************************************************
     
    34212495
    34222496
    3423 /*****************************************************************************
    3424  * Name      : StartServiceA
    3425  * Purpose   : The StartService function starts the execution of a service.
    3426  * Parameters: SC_HANDLE schService        handle of service
    3427  *             DWORD     dwNumServiceArgs  number of arguments
    3428  *             LPCSTR   *lpszServiceArgs  address of array of argument string pointers
    3429  * Variables :
    3430  * Result    :
    3431  * Remark    :
    3432  * Status    : UNTESTED STUB
    3433  *
    3434  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3435  *****************************************************************************/
    3436 
    3437 BOOL WIN32API StartServiceA(SC_HANDLE schService,
    3438                                DWORD     dwNumServiceArgs,
    3439                                LPCSTR   *lpszServiceArgs)
    3440 {
    3441   dprintf(("ADVAPI32: StartServiceA(%08xh,%08xh,%s) not implemented.\n",
    3442            schService,
    3443            dwNumServiceArgs,
    3444            lpszServiceArgs));
    3445 
    3446   return (FALSE); /* signal failure */
    3447 }
    3448 
    34492497
    34502498/*****************************************************************************
     
    34952543
    34962544
    3497 /*****************************************************************************
    3498  * Name      : StartServiceW
    3499  * Purpose   : The StartService function starts the execution of a service.
    3500  * Parameters: SC_HANDLE schService        handle of service
    3501  *             DWORD     dwNumServiceArgs  number of arguments
    3502  *             LPCWSTR   *lpszServiceArgs  address of array of argument string pointers
    3503  * Variables :
    3504  * Result    :
    3505  * Remark    :
    3506  * Status    : UNTESTED STUB
    3507  *
    3508  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3509  *****************************************************************************/
    3510 
    3511 BOOL WIN32API StartServiceW(SC_HANDLE schService,
    3512                                DWORD     dwNumServiceArgs,
    3513                                LPCWSTR   *lpszServiceArgs)
    3514 {
    3515   dprintf(("ADVAPI32: StartServiceW(%08xh,%08xh,%s) not implemented.\n",
    3516            schService,
    3517            dwNumServiceArgs,
    3518            lpszServiceArgs));
    3519 
    3520   return (FALSE); /* signal failure */
    3521 }
    3522 
    3523 
    3524 /*****************************************************************************
    3525  * Name      : UnlockServiceDatabase
    3526  * Purpose   : The UnlockServiceDatabase function unlocks a service control
    3527  *             manager database by releasing the specified lock.
    3528  * Parameters: SC_LOCK  sclLock  service control manager database lock to be released
    3529  * Variables :
    3530  * Result    :
    3531  * Remark    :
    3532  * Status    : UNTESTED STUB
    3533  *
    3534  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    3535 
    3536  *****************************************************************************/
    3537 
    3538 BOOL WIN32API UnlockServiceDatabase(SC_LOCK sclLock)
    3539 {
    3540   dprintf(("ADVAPI32: UnlockServiceDatabase(%08xh) not implemented.\n",
    3541            sclLock));
    3542 
    3543   return (FALSE); /* signal failure */
    3544 }
    3545 
     2545
  • TabularUnified tags/trunk/src/advapi32/makefile

    r12480 r12727  
    1 # $Id: makefile,v 1.14 1999-11-30 19:41:07 sandervl Exp $
     1# $Id: makefile,v 1.15 1999-12-19 19:53:36 sandervl Exp $
    22
    33#
     
    2121TARGET = advapi32
    2222
    23 OBJS =  advapi32.obj initterm.obj registry.obj lsa.obj security.obj
     23OBJS =  advapi32.obj initterm.obj registry.obj lsa.obj security.obj service.obj
    2424
    2525
     
    4646lsa.obj:      lsa.cpp $(PDWIN32_INCLUDE)\odinwrap.h
    4747initterm.obj: initterm.cpp
     48service.obj:  service.cpp
    4849
    4950clean:
Note: See TracChangeset for help on using the changeset viewer.