26 L"%systemroot%\\drivers\\win32k.sys",
27 L"advapi32_apitest_CreateService_Test_Group",
36 skip(
"No service; cannot proceed with CreateService test\n");
42 ok(*
tag != 0,
"tag is zero, expected nonzero\n");
49 skip(
"No regkey; cannot proceed with CreateService test\n");
53 tagSize =
sizeof tagData;
57 ok(tagSize ==
sizeof tagData,
"tagSize=%lu, expected 4\n", tagSize);
58 ok(tagData == *
tag,
"tag=%lu, but registry says %lu\n", *
tag, tagData);
73 ok(
ret ==
TRUE,
"DeleteService returned %ld, expected 1\n",
ret);
82 SC_HANDLE hScm =
NULL;
83 SC_HANDLE hService1 =
NULL, hService2 =
NULL;
84 SC_HANDLE hService3 =
NULL;
85 DWORD tag1 = 0, tag2 = 0;
93 skip(
"No service control manager; cannot proceed with CreateService test\n");
99 if (
MakeService(hScm,
L"advapi32_apitest_CreateService_Test_Service1", &hService1, &tag1))
102 if (
MakeService(hScm,
L"advapi32_apitest_CreateService_Test_Service2", &hService2, &tag2))
105 ok(tag1 != tag2,
"tag1=%lu, tag2=%lu\n", tag1, tag2);
110 L"advapi32_apitest_CreateService_Test_Service2",
116 L"%systemroot%\\drivers\\win32k.sys",
122 ok(hService3 ==
NULL,
"hService3=%p\n", hService3);
124 ok(tag3 == 785,
"tag3=%lu\n", tag3);
129 L"advapi32_apitest_CreateService_Test_Service2",
135 L"%systemroot%\\drivers\\win32k.sys",
141 ok(hService3 ==
NULL,
"hService3=%p\n", hService3);
143 ok(tag3 == 785,
"tag3=%lu\n", tag3);
#define ERROR_INVALID_PARAMETER
#define SERVICE_ERROR_IGNORE
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword)
DWORD WINAPI GetLastError(VOID)
static void Test_CreateService(void)
BOOL WINAPI DeleteService(SC_HANDLE hService)
LONG WINAPI RegCloseKey(HKEY hKey)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
#define SERVICE_BOOT_START
#define SC_MANAGER_CREATE_SERVICE
static void DestroyService(SC_HANDLE hService)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
START_TEST(CreateService)
#define DNS_ERROR_RCODE_NXRRSET
char * cleanup(char *str)
GLuint GLuint GLsizei GLenum type
static int MakeService(SC_HANDLE hScm, const wchar_t *serviceName, SC_HANDLE *hService, DWORD *tag)
#define HKEY_LOCAL_MACHINE
#define SERVICE_KERNEL_DRIVER