home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / win32-winsvc.ads < prev    next >
Encoding:
Text File  |  1996-03-15  |  37.3 KB  |  673 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-winsvc.ads,v $ 
  2. -- $Revision: 1.11 $ $Date: 96/03/15 12:58:14 $ $Author: stm $ 
  3. -- See end of file for Copyright (c) information.
  4.  
  5. with Win32.Winnt;
  6.  
  7. package Win32.Winsvc is
  8.  
  9.     use type Interfaces.C.Char_Array;
  10.  
  11.     SERVICES_ACTIVE_DATABASEA    : constant CHAR_Array := 
  12.                    "ServicesActive" & Nul; -- winsvc.h:62
  13.     SERVICES_ACTIVE_DATABASEW    : constant WCHAR_Array := 
  14.                    "ServicesActive" & Wide_Nul; -- winsvc.h:59
  15.     SERVICES_ACTIVE_DATABASE     : CHAR_Array renames 
  16.                    SERVICES_ACTIVE_DATABASEA; 
  17.                                                             -- winsvc.h:82
  18.     SERVICES_FAILED_DATABASEA    : constant CHAR_Array := 
  19.                    "ServicesFailed" & Nul; -- winsvc.h:63
  20.     SERVICES_FAILED_DATABASEW    : constant WCHAR_Array := 
  21.                    "ServicesFailed" & Wide_Nul; -- winsvc.h:60
  22.     SERVICES_FAILED_DATABASE     : CHAR_Array renames 
  23.                    SERVICES_FAILED_DATABASEA;
  24.                                                             -- winsvc.h:83
  25.     SC_GROUP_IDENTIFIERA         : constant Character := '+';
  26.                                                             -- winsvc.h:71
  27.     SC_GROUP_IDENTIFIERW         : constant Wide_Character := '+';
  28.                                                             -- winsvc.h:70
  29.     SC_GROUP_IDENTIFIER          : Character renames SC_GROUP_IDENTIFIERA;
  30.                                                             -- winsvc.h:85
  31.     SERVICE_NO_CHANGE            : constant := 16#ffffffff#;-- winsvc.h:92
  32.     SERVICE_ACTIVE               : constant := 16#1#;       -- winsvc.h:97
  33.     SERVICE_INACTIVE             : constant := 16#2#;       -- winsvc.h:98
  34.     SERVICE_STATE_ALL            : constant := 16#3#;       -- winsvc.h:99
  35.     SERVICE_CONTROL_STOP         : constant := 16#1#;       -- winsvc.h:105
  36.     SERVICE_CONTROL_PAUSE        : constant := 16#2#;       -- winsvc.h:106
  37.     SERVICE_CONTROL_CONTINUE     : constant := 16#3#;       -- winsvc.h:107
  38.     SERVICE_CONTROL_INTERROGATE  : constant := 16#4#;       -- winsvc.h:108
  39.     SERVICE_CONTROL_SHUTDOWN     : constant := 16#5#;       -- winsvc.h:109
  40.     SERVICE_STOPPED              : constant := 16#1#;       -- winsvc.h:114
  41.     SERVICE_START_PENDING        : constant := 16#2#;       -- winsvc.h:115
  42.     SERVICE_STOP_PENDING         : constant := 16#3#;       -- winsvc.h:116
  43.     SERVICE_RUNNING              : constant := 16#4#;       -- winsvc.h:117
  44.     SERVICE_CONTINUE_PENDING     : constant := 16#5#;       -- winsvc.h:118
  45.     SERVICE_PAUSE_PENDING        : constant := 16#6#;       -- winsvc.h:119
  46.     SERVICE_PAUSED               : constant := 16#7#;       -- winsvc.h:120
  47.     SERVICE_ACCEPT_STOP          : constant := 16#1#;       -- winsvc.h:125
  48.     SERVICE_ACCEPT_PAUSE_CONTINUE: constant := 16#2#;       -- winsvc.h:126
  49.     SERVICE_ACCEPT_SHUTDOWN      : constant := 16#4#;       -- winsvc.h:127
  50.     SC_MANAGER_CONNECT           : constant := 16#1#;       -- winsvc.h:132
  51.     SC_MANAGER_CREATE_SERVICE    : constant := 16#2#;       -- winsvc.h:133
  52.     SC_MANAGER_ENUMERATE_SERVICE : constant := 16#4#;       -- winsvc.h:134
  53.     SC_MANAGER_LOCK              : constant := 16#8#;       -- winsvc.h:135
  54.     SC_MANAGER_QUERY_LOCK_STATUS : constant := 16#10#;      -- winsvc.h:136
  55.     SC_MANAGER_MODIFY_BOOT_CONFIG: constant := 16#20#;      -- winsvc.h:137
  56.     SC_MANAGER_ALL_ACCESS        : constant := 16#f003f#;   -- winsvc.h:139
  57.     SERVICE_QUERY_CONFIG         : constant := 16#1#;       -- winsvc.h:152
  58.     SERVICE_CHANGE_CONFIG        : constant := 16#2#;       -- winsvc.h:153
  59.     SERVICE_QUERY_STATUS         : constant := 16#4#;       -- winsvc.h:154
  60.     SERVICE_ENUMERATE_DEPENDENTS : constant := 16#8#;       -- winsvc.h:155
  61.     SERVICE_START                : constant := 16#10#;      -- winsvc.h:156
  62.     SERVICE_STOP                 : constant := 16#20#;      -- winsvc.h:157
  63.     SERVICE_PAUSE_CONTINUE       : constant := 16#40#;      -- winsvc.h:158
  64.     SERVICE_INTERROGATE          : constant := 16#80#;      -- winsvc.h:159
  65.     SERVICE_USER_DEFINED_CONTROL : constant := 16#100#;     -- winsvc.h:160
  66.     SERVICE_ALL_ACCESS           : constant := 16#f01ff#;   -- winsvc.h:162
  67.  
  68.     type SERVICE_STATUS_HANDLE is new Win32.DWORD;          -- winsvc.h:181
  69.  
  70.     subtype SC_HANDLE is Win32.Winnt.HANDLE;               -- winsvc.h:178
  71.     subtype LPSC_HANDLE is Win32.Winnt.PHANDLE;            -- winsvc.h:179
  72.     subtype SC_LOCK is Win32.LPVOID;                       -- winsvc.h:226
  73.  
  74.     type SERVICE_STATUS;                                    -- winsvc.h:187
  75.     type ENUM_SERVICE_STATUSA;                              -- winsvc.h:203
  76.     type ENUM_SERVICE_STATUSW;                              -- winsvc.h:208
  77.     type QUERY_SERVICE_LOCK_STATUSA;                        -- winsvc.h:228
  78.     type QUERY_SERVICE_LOCK_STATUSW;                        -- winsvc.h:233
  79.     type QUERY_SERVICE_CONFIGA;                             -- winsvc.h:252
  80.     type QUERY_SERVICE_CONFIGW;                             -- winsvc.h:263
  81.     type SERVICE_TABLE_ENTRYA;                              -- winsvc.h:309
  82.     type SERVICE_TABLE_ENTRYW;                              -- winsvc.h:313
  83.  
  84.     type LPSERVICE_STATUS is access all SERVICE_STATUS;     -- winsvc.h:195
  85.     type LPENUM_SERVICE_STATUSA is access all ENUM_SERVICE_STATUSA;
  86.                                                             -- winsvc.h:207
  87.     subtype LPENUM_SERVICE_STATUS is LPENUM_SERVICE_STATUSA;-- winsvc.h:218
  88.     type LPENUM_SERVICE_STATUSW is access all ENUM_SERVICE_STATUSW;
  89.                                                             -- winsvc.h:212
  90.     type LPQUERY_SERVICE_LOCK_STATUSA is          
  91.            access all QUERY_SERVICE_LOCK_STATUSA;           -- winsvc.h:232
  92.     type LPQUERY_SERVICE_LOCK_STATUSW is          
  93.            access all QUERY_SERVICE_LOCK_STATUSW;           -- winsvc.h:237
  94.     subtype LPQUERY_SERVICE_LOCK_STATUS is LPQUERY_SERVICE_LOCK_STATUSA;
  95.                                                             -- winsvc.h:243
  96.     type LPQUERY_SERVICE_CONFIGA is access all QUERY_SERVICE_CONFIGA;
  97.                                                             -- winsvc.h:262
  98.     subtype LPQUERY_SERVICE_CONFIG is LPQUERY_SERVICE_CONFIGA;
  99.                                                             -- winsvc.h:279
  100.     type LPQUERY_SERVICE_CONFIGW is access all QUERY_SERVICE_CONFIGW;
  101.                                                             -- winsvc.h:273
  102.     type LPSERVICE_TABLE_ENTRYA is access all SERVICE_TABLE_ENTRYA;
  103.                                                             -- winsvc.h:312
  104.     subtype LPSERVICE_TABLE_ENTRY is LPSERVICE_TABLE_ENTRYA;-- winsvc.h:322
  105.     type LPSERVICE_TABLE_ENTRYW is access all SERVICE_TABLE_ENTRYW;
  106.                                                             -- winsvc.h:316
  107.  
  108.     type SERVICE_STATUS is                                  -- winsvc.h:187
  109.         record
  110.             dwServiceType            : Win32.DWORD;         -- winsvc.h:188
  111.             dwCurrentState           : Win32.DWORD;         -- winsvc.h:189
  112.             dwControlsAccepted       : Win32.DWORD;         -- winsvc.h:190
  113.             dwWin32ExitCode          : Win32.DWORD;         -- winsvc.h:191
  114.             dwServiceSpecificExitCode: Win32.DWORD;         -- winsvc.h:192
  115.             dwCheckPoint             : Win32.DWORD;         -- winsvc.h:193
  116.             dwWaitHint               : Win32.DWORD;         -- winsvc.h:194
  117.         end record;
  118.  
  119.     type ENUM_SERVICE_STATUSA is                            -- winsvc.h:203
  120.         record
  121.             lpServiceName: Win32.LPSTR;                     -- winsvc.h:204
  122.             lpDisplayName: Win32.LPSTR;                     -- winsvc.h:205
  123.             ServiceStatus: SERVICE_STATUS;                  -- winsvc.h:206
  124.         end record;
  125.  
  126.     type ENUM_SERVICE_STATUSW is                            -- winsvc.h:208
  127.         record
  128.             lpServiceName: Win32.LPWSTR;                    -- winsvc.h:209
  129.             lpDisplayName: Win32.LPWSTR;                    -- winsvc.h:210
  130.             ServiceStatus: SERVICE_STATUS;                  -- winsvc.h:211
  131.         end record;
  132.  
  133.     subtype ENUM_SERVICE_STATUS is ENUM_SERVICE_STATUSA;    -- winsvc.h:217
  134.  
  135.     type QUERY_SERVICE_LOCK_STATUSA is                      -- winsvc.h:228
  136.         record
  137.             fIsLocked     : Win32.DWORD;                    -- winsvc.h:229
  138.             lpLockOwner   : Win32.LPSTR;                    -- winsvc.h:230
  139.             dwLockDuration: Win32.DWORD;                    -- winsvc.h:231
  140.         end record;
  141.  
  142.     type QUERY_SERVICE_LOCK_STATUSW is                      -- winsvc.h:233
  143.         record
  144.             fIsLocked     : Win32.DWORD;                    -- winsvc.h:234
  145.             lpLockOwner   : Win32.LPWSTR;                   -- winsvc.h:235
  146.             dwLockDuration: Win32.DWORD;                    -- winsvc.h:236
  147.         end record;
  148.  
  149.     subtype QUERY_SERVICE_LOCK_STATUS is QUERY_SERVICE_LOCK_STATUSA;
  150.                                                             -- winsvc.h:242
  151.  
  152.     type QUERY_SERVICE_CONFIGA is                           -- winsvc.h:252
  153.         record
  154.             dwServiceType     : Win32.DWORD;                -- winsvc.h:253
  155.             dwStartType       : Win32.DWORD;                -- winsvc.h:254
  156.             dwErrorControl    : Win32.DWORD;                -- winsvc.h:255
  157.             lpBinaryPathName  : Win32.LPSTR;                -- winsvc.h:256
  158.             lpLoadOrderGroup  : Win32.LPSTR;                -- winsvc.h:257
  159.             dwTagId           : Win32.DWORD;                -- winsvc.h:258
  160.             lpDependencies    : Win32.LPSTR;                -- winsvc.h:259
  161.             lpServiceStartName: Win32.LPSTR;                -- winsvc.h:260
  162.             lpDisplayName     : Win32.LPSTR;                -- winsvc.h:261
  163.         end record;
  164.  
  165.     type QUERY_SERVICE_CONFIGW is                           -- winsvc.h:263
  166.         record
  167.             dwServiceType     : Win32.DWORD;                -- winsvc.h:264
  168.             dwStartType       : Win32.DWORD;                -- winsvc.h:265
  169.             dwErrorControl    : Win32.DWORD;                -- winsvc.h:266
  170.             lpBinaryPathName  : Win32.LPWSTR;               -- winsvc.h:267
  171.             lpLoadOrderGroup  : Win32.LPWSTR;               -- winsvc.h:268
  172.             dwTagId           : Win32.DWORD;                -- winsvc.h:269
  173.             lpDependencies    : Win32.LPWSTR;               -- winsvc.h:270
  174.             lpServiceStartName: Win32.LPWSTR;               -- winsvc.h:271
  175.             lpDisplayName     : Win32.LPWSTR;               -- winsvc.h:272
  176.         end record;
  177.  
  178.     subtype QUERY_SERVICE_CONFIG is QUERY_SERVICE_CONFIGA;  -- winsvc.h:278
  179.  
  180.     type LPSERVICE_MAIN_FUNCTIONW is access procedure (
  181.         dwNumServicesArgs  : Win32.DWORD;
  182.         lpServiceArgVectors: access Win32.PWSTR);           -- winsvc.h:288
  183.     pragma Convention(Stdcall, LPSERVICE_MAIN_FUNCTIONW);
  184.     type LPSERVICE_MAIN_FUNCTIONA is access procedure (
  185.         dwNumServicesArgs  : Win32.DWORD;
  186.         lpServiceArgVectors: access Win32.PSTR);            -- winsvc.h:293
  187.     pragma Convention(Stdcall, LPSERVICE_MAIN_FUNCTIONA);
  188.     subtype LPSERVICE_MAIN_FUNCTION is LPSERVICE_MAIN_FUNCTIONA;
  189.                                                             -- winsvc.h:301
  190.  
  191.     type SERVICE_TABLE_ENTRYA is                            -- winsvc.h:309
  192.         record
  193.             lpServiceName: Win32.LPSTR;                     -- winsvc.h:310
  194.             lpServiceProc: LPSERVICE_MAIN_FUNCTIONA;        -- winsvc.h:311
  195.         end record;
  196.  
  197.     type SERVICE_TABLE_ENTRYW is                            -- winsvc.h:313
  198.         record
  199.             lpServiceName: Win32.LPWSTR;                    -- winsvc.h:314
  200.             lpServiceProc: LPSERVICE_MAIN_FUNCTIONW;        -- winsvc.h:315
  201.         end record;
  202.  
  203.     subtype SERVICE_TABLE_ENTRY is SERVICE_TABLE_ENTRYA;    -- winsvc.h:321
  204.  
  205.     type LPHANDLER_FUNCTION is access procedure (dwControl: Win32.DWORD);
  206.     pragma Convention(Stdcall, LPHANDLER_FUNCTION);
  207.                                                             -- winsvc.h:329
  208.  
  209.     function ChangeServiceConfigA(hService          : SC_HANDLE;
  210.                                   dwServiceType     : Win32.DWORD;
  211.                                   dwStartType       : Win32.DWORD;
  212.                                   dwErrorControl    : Win32.DWORD;
  213.                                   lpBinaryPathName  : Win32.LPCSTR;
  214.                                   lpLoadOrderGroup  : Win32.LPCSTR;
  215.                                   lpdwTagId         : Win32.LPDWORD;
  216.                                   lpDependencies    : Win32.LPCSTR;
  217.                                   lpServiceStartName: Win32.LPCSTR;
  218.                                   lpPassword        : Win32.LPCSTR;
  219.                                   lpDisplayName     : Win32.LPCSTR)
  220.                                                       return Win32.BOOL;
  221.                                                             -- winsvc.h:342
  222.  
  223.     function ChangeServiceConfig(
  224.         hService          : SC_HANDLE;
  225.         dwServiceType     : Win32.DWORD;
  226.         dwStartType       : Win32.DWORD;
  227.         dwErrorControl    : Win32.DWORD;
  228.         lpBinaryPathName  : Win32.LPCSTR;
  229.         lpLoadOrderGroup  : Win32.LPCSTR;
  230.         lpdwTagId         : Win32.LPDWORD;
  231.         lpDependencies    : Win32.LPCSTR;
  232.         lpServiceStartName: Win32.LPCSTR;
  233.         lpPassword        : Win32.LPCSTR;
  234.         lpDisplayName     : Win32.LPCSTR)
  235.                             return Win32.BOOL
  236.                             renames ChangeServiceConfigA;   -- winsvc.h:342
  237.  
  238.     function ChangeServiceConfigW(hService          : SC_HANDLE;
  239.                                   dwServiceType     : Win32.DWORD;
  240.                                   dwStartType       : Win32.DWORD;
  241.                                   dwErrorControl    : Win32.DWORD;
  242.                                   lpBinaryPathName  : Win32.LPCWSTR;
  243.                                   lpLoadOrderGroup  : Win32.LPCWSTR;
  244.                                   lpdwTagId         : Win32.LPDWORD;
  245.                                   lpDependencies    : Win32.LPCWSTR;
  246.                                   lpServiceStartName: Win32.LPCWSTR;
  247.                                   lpPassword        : Win32.LPCWSTR;
  248.                                   lpDisplayName     : Win32.LPCWSTR)
  249.                                                       return Win32.BOOL;
  250.                                                             -- winsvc.h:358
  251.  
  252.     function CloseServiceHandle(hSCObject: SC_HANDLE) return Win32.BOOL;
  253.                                                             -- winsvc.h:380
  254.  
  255.     function ControlService(hService       : SC_HANDLE;
  256.                             dwControl      : Win32.DWORD;
  257.                             lpServiceStatus: access SERVICE_STATUS)
  258.                                              return Win32.BOOL;
  259.                                                             -- winsvc.h:387
  260.  
  261.     function CreateServiceA(hSCManager        : SC_HANDLE;
  262.                             lpServiceName     : Win32.LPCSTR;
  263.                             lpDisplayName     : Win32.LPCSTR;
  264.                             dwDesiredAccess   : Win32.DWORD;
  265.                             dwServiceType     : Win32.DWORD;
  266.                             dwStartType       : Win32.DWORD;
  267.                             dwErrorControl    : Win32.DWORD;
  268.                             lpBinaryPathName  : Win32.LPCSTR;
  269.                             lpLoadOrderGroup  : Win32.LPCSTR;
  270.                             lpdwTagId         : Win32.LPDWORD;
  271.                             lpDependencies    : Win32.LPCSTR;
  272.                             lpServiceStartName: Win32.LPCSTR;
  273.                             lpPassword        : Win32.LPCSTR)
  274.                                                 return SC_HANDLE;
  275.                                                             -- winsvc.h:396
  276.  
  277.     function CreateService(hSCManager        : SC_HANDLE;
  278.                            lpServiceName     : Win32.LPCSTR;
  279.                            lpDisplayName     : Win32.LPCSTR;
  280.                            dwDesiredAccess   : Win32.DWORD;
  281.                            dwServiceType     : Win32.DWORD;
  282.                            dwStartType       : Win32.DWORD;
  283.                            dwErrorControl    : Win32.DWORD;
  284.                            lpBinaryPathName  : Win32.LPCSTR;
  285.                            lpLoadOrderGroup  : Win32.LPCSTR;
  286.                            lpdwTagId         : Win32.LPDWORD;
  287.                            lpDependencies    : Win32.LPCSTR;
  288.                            lpServiceStartName: Win32.LPCSTR;
  289.                            lpPassword        : Win32.LPCSTR)
  290.                                                return SC_HANDLE
  291.                                                renames CreateServiceA;
  292.                                                             -- winsvc.h:396
  293.  
  294.     function CreateServiceW(hSCManager        : SC_HANDLE;
  295.                             lpServiceName     : Win32.LPCWSTR;
  296.                             lpDisplayName     : Win32.LPCWSTR;
  297.                             dwDesiredAccess   : Win32.DWORD;
  298.                             dwServiceType     : Win32.DWORD;
  299.                             dwStartType       : Win32.DWORD;
  300.                             dwErrorControl    : Win32.DWORD;
  301.                             lpBinaryPathName  : Win32.LPCWSTR;
  302.                             lpLoadOrderGroup  : Win32.LPCWSTR;
  303.                             lpdwTagId         : Win32.LPDWORD;
  304.                             lpDependencies    : Win32.LPCWSTR;
  305.                             lpServiceStartName: Win32.LPCWSTR;
  306.                             lpPassword        : Win32.LPCWSTR)
  307.                                                 return SC_HANDLE;
  308.                                                             -- winsvc.h:414
  309.  
  310.     function DeleteService(hService: SC_HANDLE) return Win32.BOOL;
  311.                                                             -- winsvc.h:438
  312.  
  313.     function EnumDependentServicesA(
  314.                hService          : SC_HANDLE;
  315.                dwServiceState    : Win32.DWORD;
  316.                lpServices        : access ENUM_SERVICE_STATUSA;
  317.                cbBufSize         : Win32.DWORD;
  318.                pcbBytesNeeded    : Win32.LPDWORD;
  319.                lpServicesReturned: Win32.LPDWORD)
  320.               return Win32.BOOL;                            -- winsvc.h:445
  321.  
  322.     function EnumDependentServices(
  323.         hService          : SC_HANDLE;
  324.         dwServiceState    : Win32.DWORD;
  325.         lpServices        : access ENUM_SERVICE_STATUSA;
  326.         cbBufSize         : Win32.DWORD;
  327.         pcbBytesNeeded    : Win32.LPDWORD;
  328.         lpServicesReturned: Win32.LPDWORD)
  329.                             return Win32.BOOL
  330.                             renames EnumDependentServicesA; -- winsvc.h:445
  331.  
  332.     function EnumDependentServicesW(
  333.                hService          : SC_HANDLE;
  334.                dwServiceState    : Win32.DWORD;
  335.                lpServices        : access ENUM_SERVICE_STATUSW;
  336.                cbBufSize         : Win32.DWORD;
  337.                pcbBytesNeeded    : Win32.LPDWORD;
  338.                lpServicesReturned: Win32.LPDWORD)
  339.               return Win32.BOOL;                            -- winsvc.h:456
  340.  
  341.     function EnumServicesStatusA(
  342.                hSCManager        : SC_HANDLE;
  343.                dwServiceType     : Win32.DWORD;
  344.                dwServiceState    : Win32.DWORD;
  345.                lpServices        : access ENUM_SERVICE_STATUSA;
  346.                cbBufSize         : Win32.DWORD;
  347.                pcbBytesNeeded    : Win32.LPDWORD;
  348.                lpServicesReturned: Win32.LPDWORD;
  349.                lpResumeHandle    : Win32.LPDWORD)
  350.               return Win32.BOOL;                            -- winsvc.h:473
  351.  
  352.     function EnumServicesStatus(
  353.         hSCManager        : SC_HANDLE;
  354.         dwServiceType     : Win32.DWORD;
  355.         dwServiceState    : Win32.DWORD;
  356.         lpServices        : access ENUM_SERVICE_STATUSA;
  357.         cbBufSize         : Win32.DWORD;
  358.         pcbBytesNeeded    : Win32.LPDWORD;
  359.         lpServicesReturned: Win32.LPDWORD;
  360.         lpResumeHandle    : Win32.LPDWORD)
  361.                             return Win32.BOOL
  362.                             renames EnumServicesStatusA;    -- winsvc.h:473
  363.  
  364.     function EnumServicesStatusW(
  365.                hSCManager        : SC_HANDLE;
  366.                dwServiceType     : Win32.DWORD;
  367.                dwServiceState    : Win32.DWORD;
  368.                lpServices        : access ENUM_SERVICE_STATUSW;
  369.                cbBufSize         : Win32.DWORD;
  370.                pcbBytesNeeded    : Win32.LPDWORD;
  371.                lpServicesReturned: Win32.LPDWORD;
  372.                lpResumeHandle    : Win32.LPDWORD)
  373.               return Win32.BOOL;                            -- winsvc.h:486
  374.  
  375.     function GetServiceKeyNameA(hSCManager   : SC_HANDLE;
  376.                                 lpDisplayName: Win32.LPCSTR;
  377.                                 lpServiceName: Win32.LPSTR;
  378.                                 lpcchBuffer  : Win32.LPDWORD)
  379.                                                return Win32.BOOL;
  380.                                                             -- winsvc.h:505
  381.  
  382.     function GetServiceKeyName(hSCManager   : SC_HANDLE;
  383.                                lpDisplayName: Win32.LPCSTR;
  384.                                lpServiceName: Win32.LPSTR;
  385.                                lpcchBuffer  : Win32.LPDWORD)
  386.                                               return Win32.BOOL
  387.                                               renames GetServiceKeyNameA;
  388.                                                             -- winsvc.h:505
  389.  
  390.     function GetServiceKeyNameW(hSCManager   : SC_HANDLE;
  391.                                 lpDisplayName: Win32.LPCWSTR;
  392.                                 lpServiceName: Win32.LPWSTR;
  393.                                 lpcchBuffer  : Win32.LPDWORD)
  394.                                                return Win32.BOOL;
  395.                                                             -- winsvc.h:514
  396.  
  397.     function GetServiceDisplayNameA(hSCManager   : SC_HANDLE;
  398.                                     lpServiceName: Win32.LPCSTR;
  399.                                     lpDisplayName: Win32.LPSTR;
  400.                                     lpcchBuffer  : Win32.LPDWORD)
  401.                                                    return Win32.BOOL;
  402.                                                             -- winsvc.h:529
  403.  
  404.     function GetServiceDisplayName(
  405.         hSCManager   : SC_HANDLE;
  406.         lpServiceName: Win32.LPCSTR;
  407.         lpDisplayName: Win32.LPSTR;
  408.         lpcchBuffer  : Win32.LPDWORD)
  409.                        return Win32.BOOL
  410.                        renames GetServiceDisplayNameA;      -- winsvc.h:529
  411.  
  412.     function GetServiceDisplayNameW(hSCManager   : SC_HANDLE;
  413.                                     lpServiceName: Win32.LPCWSTR;
  414.                                     lpDisplayName: Win32.LPWSTR;
  415.                                     lpcchBuffer  : Win32.LPDWORD)
  416.                                                    return Win32.BOOL;
  417.                                                             -- winsvc.h:538
  418.  
  419.     function LockServiceDatabase(hSCManager: SC_HANDLE) return SC_LOCK;
  420.                                                             -- winsvc.h:553
  421.  
  422.     function NotifyBootConfigStatus(BootAcceptable: Win32.BOOL) 
  423.         return Win32.BOOL;                                  -- winsvc.h:560
  424.  
  425.     function OpenSCManagerA(lpMachineName  : Win32.LPCSTR;
  426.                             lpDatabaseName : Win32.LPCSTR;
  427.                             dwDesiredAccess: Win32.DWORD)
  428.                                              return SC_HANDLE;
  429.                                                             -- winsvc.h:567
  430.  
  431.     function OpenSCManager(lpMachineName  : Win32.LPCSTR;
  432.                            lpDatabaseName : Win32.LPCSTR;
  433.                            dwDesiredAccess: Win32.DWORD)
  434.                                             return SC_HANDLE
  435.                                             renames OpenSCManagerA;
  436.                                                             -- winsvc.h:567
  437.  
  438.     function OpenSCManagerW(lpMachineName  : Win32.LPCWSTR;
  439.                             lpDatabaseName : Win32.LPCWSTR;
  440.                             dwDesiredAccess: Win32.DWORD)
  441.                                              return SC_HANDLE;
  442.                                                             -- winsvc.h:575
  443.  
  444.     function OpenServiceA(hSCManager     : SC_HANDLE;
  445.                           lpServiceName  : Win32.LPCSTR;
  446.                           dwDesiredAccess: Win32.DWORD)
  447.                                            return SC_HANDLE;-- winsvc.h:589
  448.  
  449.     function OpenService(hSCManager     : SC_HANDLE;
  450.                          lpServiceName  : Win32.LPCSTR;
  451.                          dwDesiredAccess: Win32.DWORD)
  452.                                           return SC_HANDLE
  453.                                           renames OpenServiceA;
  454.                                                             -- winsvc.h:589
  455.  
  456.     function OpenServiceW(hSCManager     : SC_HANDLE;
  457.                           lpServiceName  : Win32.LPCWSTR;
  458.                           dwDesiredAccess: Win32.DWORD)
  459.                                            return SC_HANDLE;-- winsvc.h:597
  460.  
  461.     function QueryServiceConfigA(hService       : SC_HANDLE;
  462.                                  lpServiceConfig: access QUERY_SERVICE_CONFIGA;
  463.                                  cbBufSize      : Win32.DWORD;
  464.                                  pcbBytesNeeded : Win32.LPDWORD)
  465.                                                   return Win32.BOOL;
  466.                                                             -- winsvc.h:611
  467.  
  468.     function QueryServiceConfig(hService       : SC_HANDLE;
  469.                                 lpServiceConfig: access QUERY_SERVICE_CONFIGA;
  470.                                 cbBufSize      : Win32.DWORD;
  471.                                 pcbBytesNeeded : Win32.LPDWORD)
  472.                                                  return Win32.BOOL
  473.                                                  renames QueryServiceConfigA;
  474.                                                             -- winsvc.h:611
  475.  
  476.     function QueryServiceConfigW(hService       : SC_HANDLE;
  477.                                  lpServiceConfig: access QUERY_SERVICE_CONFIGW;
  478.                                  cbBufSize      : Win32.DWORD;
  479.                                  pcbBytesNeeded : Win32.LPDWORD)
  480.                                                   return Win32.BOOL;
  481.                                                             -- winsvc.h:620
  482.  
  483.     function QueryServiceLockStatusA(
  484.         hSCManager    : SC_HANDLE;
  485.         lpLockStatus  : access QUERY_SERVICE_LOCK_STATUSA;
  486.         cbBufSize     : Win32.DWORD;
  487.         pcbBytesNeeded: Win32.LPDWORD)
  488.                         return Win32.BOOL;                  -- winsvc.h:635
  489.  
  490.     function QueryServiceLockStatus(
  491.         hSCManager    : SC_HANDLE;
  492.         lpLockStatus  : access QUERY_SERVICE_LOCK_STATUSA;
  493.         cbBufSize     : Win32.DWORD;
  494.         pcbBytesNeeded: Win32.LPDWORD)
  495.                         return Win32.BOOL
  496.                         renames QueryServiceLockStatusA;    -- winsvc.h:635
  497.  
  498.     function QueryServiceLockStatusW(
  499.         hSCManager    : SC_HANDLE;
  500.         lpLockStatus  : access QUERY_SERVICE_LOCK_STATUSW;
  501.         cbBufSize     : Win32.DWORD;
  502.         pcbBytesNeeded: Win32.LPDWORD)
  503.                         return Win32.BOOL;                  -- winsvc.h:644
  504.  
  505.     function QueryServiceObjectSecurity(
  506.         hService             : SC_HANDLE;
  507.         dwSecurityInformation: Win32.Winnt.SECURITY_INFORMATION;
  508.         lpSecurityDescriptor : Win32.Winnt.PSECURITY_DESCRIPTOR;
  509.         cbBufSize            : Win32.DWORD;
  510.         pcbBytesNeeded       : Win32.LPDWORD)
  511.                                return Win32.BOOL;           -- winsvc.h:659
  512.  
  513.     function QueryServiceStatus(hService       : SC_HANDLE;
  514.                                 lpServiceStatus: access SERVICE_STATUS)
  515.                                                  return Win32.BOOL;
  516.                                                             -- winsvc.h:670
  517.  
  518.     function RegisterServiceCtrlHandlerA(
  519.         lpServiceName: Win32.LPCSTR;
  520.         lpHandlerProc: LPHANDLER_FUNCTION)
  521.                        return SERVICE_STATUS_HANDLE;        -- winsvc.h:678
  522.  
  523.     function RegisterServiceCtrlHandler(
  524.         lpServiceName: Win32.LPCSTR;
  525.         lpHandlerProc: LPHANDLER_FUNCTION)
  526.                        return SERVICE_STATUS_HANDLE
  527.                        renames RegisterServiceCtrlHandlerA; -- winsvc.h:678
  528.  
  529.     function RegisterServiceCtrlHandlerW(
  530.         lpServiceName: Win32.LPCWSTR;
  531.         lpHandlerProc: LPHANDLER_FUNCTION)
  532.                        return SERVICE_STATUS_HANDLE;        -- winsvc.h:685
  533.  
  534.     function SetServiceObjectSecurity(
  535.         hService             : SC_HANDLE;
  536.         dwSecurityInformation: Win32.Winnt.SECURITY_INFORMATION;
  537.         lpSecurityDescriptor : Win32.Winnt.PSECURITY_DESCRIPTOR)
  538.                                return Win32.BOOL;           -- winsvc.h:698
  539.  
  540.     function SetServiceStatus(hServiceStatus : SERVICE_STATUS_HANDLE;
  541.                               lpServiceStatus: access SERVICE_STATUS)
  542.                                                return Win32.BOOL;
  543.                                                             -- winsvc.h:707
  544.  
  545.     function StartServiceCtrlDispatcherA(
  546.         lpServiceStartTable: access SERVICE_TABLE_ENTRYA) return Win32.BOOL;
  547.                                                             -- winsvc.h:715
  548.  
  549.     function StartServiceCtrlDispatcher(
  550.         lpServiceStartTable: access SERVICE_TABLE_ENTRYA) return Win32.BOOL
  551.                renames StartServiceCtrlDispatcherA;         -- winsvc.h:715
  552.  
  553.     function StartServiceCtrlDispatcherW(
  554.         lpServiceStartTable: access SERVICE_TABLE_ENTRYW) return Win32.BOOL;
  555.                                                             -- winsvc.h:721
  556.  
  557.     function StartServiceA(hService           : SC_HANDLE;
  558.                            dwNumServiceArgs   : Win32.DWORD;
  559.                            lpServiceArgVectors: access Win32.LPCSTR)
  560.                                                 return Win32.BOOL;
  561.                                                             -- winsvc.h:734
  562.  
  563.     function StartService(hService           : SC_HANDLE;
  564.                           dwNumServiceArgs   : Win32.DWORD;
  565.                           lpServiceArgVectors: access Win32.LPCSTR)
  566.                                                return Win32.BOOL
  567.                                                renames StartServiceA;
  568.                                                             -- winsvc.h:734
  569.  
  570.     function StartServiceW(hService           : SC_HANDLE;
  571.                            dwNumServiceArgs   : Win32.DWORD;
  572.                            lpServiceArgVectors: access Win32.LPCWSTR)
  573.                                                 return Win32.BOOL;
  574.                                                             -- winsvc.h:742
  575.  
  576.     function UnlockServiceDatabase(ScLock: SC_LOCK) return Win32.BOOL;
  577.                                                             -- winsvc.h:756
  578.  
  579. private
  580.  
  581.     pragma Convention(C, SERVICE_STATUS);                   -- winsvc.h:187
  582.     pragma Convention(C, ENUM_SERVICE_STATUSA);             -- winsvc.h:203
  583.     pragma Convention(C, ENUM_SERVICE_STATUSW);             -- winsvc.h:208
  584.     pragma Convention(C, QUERY_SERVICE_LOCK_STATUSA);       -- winsvc.h:228
  585.     pragma Convention(C, QUERY_SERVICE_LOCK_STATUSW);       -- winsvc.h:233
  586.     pragma Convention(C, QUERY_SERVICE_CONFIGA);            -- winsvc.h:252
  587.     pragma Convention(C, QUERY_SERVICE_CONFIGW);            -- winsvc.h:263
  588.     pragma Convention(C, SERVICE_TABLE_ENTRYA);             -- winsvc.h:309
  589.     pragma Convention(C, SERVICE_TABLE_ENTRYW);             -- winsvc.h:313
  590.  
  591.     pragma Import(Stdcall, ChangeServiceConfigA, "ChangeServiceConfigA");
  592.                                                             -- winsvc.h:342
  593.     pragma Import(Stdcall, ChangeServiceConfigW, "ChangeServiceConfigW");
  594.                                                             -- winsvc.h:358
  595.     pragma Import(Stdcall, CloseServiceHandle, "CloseServiceHandle");
  596.                                                             -- winsvc.h:380
  597.     pragma Import(Stdcall, ControlService, "ControlService");     -- winsvc.h:387
  598.     pragma Import(Stdcall, CreateServiceA, "CreateServiceA");     -- winsvc.h:396
  599.     pragma Import(Stdcall, CreateServiceW, "CreateServiceW");     -- winsvc.h:414
  600.     pragma Import(Stdcall, DeleteService, "DeleteService");       -- winsvc.h:438
  601.     pragma Import(Stdcall, EnumDependentServicesA, "EnumDependentServicesA");
  602.                                                             -- winsvc.h:445
  603.     pragma Import(Stdcall, EnumDependentServicesW, "EnumDependentServicesW");
  604.                                                             -- winsvc.h:456
  605.     pragma Import(Stdcall, EnumServicesStatusA, "EnumServicesStatusA");
  606.                                                             -- winsvc.h:473
  607.     pragma Import(Stdcall, EnumServicesStatusW, "EnumServicesStatusW");
  608.                                                             -- winsvc.h:486
  609.     pragma Import(Stdcall, GetServiceKeyNameA, "GetServiceKeyNameA");
  610.                                                             -- winsvc.h:505
  611.     pragma Import(Stdcall, GetServiceKeyNameW, "GetServiceKeyNameW");
  612.                                                             -- winsvc.h:514
  613.     pragma Import(Stdcall, GetServiceDisplayNameA, "GetServiceDisplayNameA");
  614.                                                             -- winsvc.h:529
  615.     pragma Import(Stdcall, GetServiceDisplayNameW, "GetServiceDisplayNameW");
  616.                                                             -- winsvc.h:538
  617.     pragma Import(Stdcall, LockServiceDatabase, "LockServiceDatabase");
  618.                                                             -- winsvc.h:553
  619.     pragma Import(Stdcall, NotifyBootConfigStatus, "NotifyBootConfigStatus");
  620.                                                             -- winsvc.h:560
  621.     pragma Import(Stdcall, OpenSCManagerA, "OpenSCManagerA");     -- winsvc.h:567
  622.     pragma Import(Stdcall, OpenSCManagerW, "OpenSCManagerW");     -- winsvc.h:575
  623.     pragma Import(Stdcall, OpenServiceA, "OpenServiceA");         -- winsvc.h:589
  624.     pragma Import(Stdcall, OpenServiceW, "OpenServiceW");         -- winsvc.h:597
  625.     pragma Import(Stdcall, QueryServiceConfigA, "QueryServiceConfigA");
  626.                                                             -- winsvc.h:611
  627.     pragma Import(Stdcall, QueryServiceConfigW, "QueryServiceConfigW");
  628.                                                             -- winsvc.h:620
  629.     pragma Import(Stdcall, QueryServiceLockStatusA, "QueryServiceLockStatusA");
  630.                                                             -- winsvc.h:635
  631.     pragma Import(Stdcall, QueryServiceLockStatusW, "QueryServiceLockStatusW");
  632.                                                             -- winsvc.h:644
  633.     pragma Import(Stdcall, QueryServiceObjectSecurity, "QueryServiceObjectSecurity");
  634.                                                             -- winsvc.h:659
  635.     pragma Import(Stdcall, QueryServiceStatus, "QueryServiceStatus");
  636.                                                             -- winsvc.h:670
  637.     pragma Import(Stdcall, RegisterServiceCtrlHandlerA, 
  638.                      "RegisterServiceCtrlHandlerA");        -- winsvc.h:678
  639.     pragma Import(Stdcall, RegisterServiceCtrlHandlerW, 
  640.                "RegisterServiceCtrlHandlerW");              -- winsvc.h:685
  641.     pragma Import(Stdcall, SetServiceObjectSecurity, "SetServiceObjectSecurity");
  642.                                                             -- winsvc.h:698
  643.     pragma Import(Stdcall, SetServiceStatus, "SetServiceStatus"); -- winsvc.h:707
  644.     pragma Import(Stdcall, StartServiceCtrlDispatcherA, 
  645.                      "StartServiceCtrlDispatcherA");        -- winsvc.h:715
  646.     pragma Import(Stdcall, StartServiceCtrlDispatcherW, 
  647.                      "StartServiceCtrlDispatcherW");        -- winsvc.h:721
  648.     pragma Import(Stdcall, StartServiceA, "StartServiceA");       -- winsvc.h:734
  649.     pragma Import(Stdcall, StartServiceW, "StartServiceW");       -- winsvc.h:742
  650.     pragma Import(Stdcall, UnlockServiceDatabase, "UnlockServiceDatabase");
  651.                                                             -- winsvc.h:756
  652.  
  653. -------------------------------------------------------------------------------
  654. --
  655. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  656. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  657. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  658. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  659. -- the accuracy and the use of this file.  This file may be used, copied,
  660. -- modified and distributed only by licensees of Microsoft Corporation's
  661. -- WIN32 Software Development Kit in accordance with the terms of the 
  662. -- licensee's End-User License Agreement for Microsoft Software for the
  663. -- WIN32 Development Kit.
  664. --
  665. -- Copyright (c) Intermetrics, Inc. 1995
  666. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  667. -- Microsoft is a registered trademark and Windows and Windows NT are
  668. -- trademarks of Microsoft Corporation.
  669. --
  670. -------------------------------------------------------------------------------
  671.  
  672. end Win32.Winsvc;
  673.