68 win_skip(
"OpenSCManagerA is not implemented, we are most likely on win9x\n");
74 strcpy(inf,
"[Version]\nSignature=\"$Chicago$\"\n");
82 ok(!
ret,
"Expected failure\n");
84 "Expected ERROR_SECTION_NOT_FOUND, got %08d\n", (
int)
GetLastError());
90 strcat(inf,
"[Winetest.Services]\n");
95 ok(!
ret,
"Expected failure\n");
97 "Expected ERROR_SECTION_NOT_FOUND, got %08d\n", (
int)
GetLastError());
102 strcat(inf,
"AddService=Winetest,,Winetest.Service\n");
107 ok(!
ret,
"Expected failure\n");
109 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
114 strcat(inf,
"[Winetest.Service]\n");
119 ok(!
ret,
"Expected failure\n");
121 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
126 strcat(inf,
"ServiceBinary=%12%\\winetest.sys\n");
131 ok(!
ret,
"Expected failure\n");
133 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
138 strcat(inf,
"ServiceType=1\n");
143 ok(!
ret,
"Expected failure\n");
145 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
150 strcat(inf,
"StartType=4\n");
155 ok(!
ret,
"Expected failure\n");
157 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
162 strcat(inf,
"ErrorControl=1");
169 skip(
"Not enough rights to install the service\n");
174 ok(
ret,
"Expected success\n");
176 "Expected ERROR_SUCCESS, got %08d\n", (
int)
GetLastError());
184 ok(svc_handle !=
NULL,
"Service was not created\n");
193 strcpy(inf,
"[Version]\nSignature=\"$Chicago$\"\n");
194 strcat(inf,
"[XSP.InstallPerVer]\n");
195 strcat(inf,
"AddReg=AspEventlogMsg.Reg,Perf.Reg,AspVersions.Reg,FreeADO.Reg,IndexServer.Reg\n");
202 ok(
ret,
"Expected success\n");
223 win_skip(
"OpenSCManagerW is not implemented, we are most likely on win9x\n");
229 strcpy(inf,
"[Version]\nSignature=\"$Chicago$\"\n");
237 ok(!
ret,
"Expected failure\n");
239 "Expected ERROR_SECTION_NOT_FOUND, got %08d\n", (
int)
GetLastError());
245 strcat(inf,
"[Winetest.Services]\n");
250 ok(!
ret,
"Expected failure\n");
252 "Expected ERROR_SECTION_NOT_FOUND, got %08d\n", (
int)
GetLastError());
257 strcat(inf,
"AddService=Winetest,,Winetest.Service\n");
262 ok(!
ret,
"Expected failure\n");
264 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
269 strcat(inf,
"[Winetest.Service]\n");
274 ok(!
ret,
"Expected failure\n");
276 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
281 strcat(inf,
"ServiceBinary=%12%\\winetest.sys\n");
286 ok(!
ret,
"Expected failure\n");
288 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
293 strcat(inf,
"ServiceType=1\n");
298 ok(!
ret,
"Expected failure\n");
300 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
305 strcat(inf,
"StartType=4\n");
310 ok(!
ret,
"Expected failure\n");
312 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08d\n", (
int)
GetLastError());
317 strcat(inf,
"ErrorControl=1");
324 skip(
"Not enough rights to install the service\n");
329 ok(
ret,
"Expected success\n");
331 "Expected ERROR_SUCCESS, got %08d\n", (
int)
GetLastError());
339 ok(svc_handle !=
NULL,
"Service was not created\n");
348 strcpy(inf,
"[Version]\nSignature=\"$Chicago$\"\n");
349 strcat(inf,
"[XSP.InstallPerVer]\n");
350 strcat(inf,
"AddReg=AspEventlogMsg.Reg,Perf.Reg,AspVersions.Reg,FreeADO.Reg,IndexServer.Reg\n");
357 ok(
ret,
"Expected success\n");
static SC_HANDLE scm_handle
static void test_SetupInstallServicesFromInfSectionExA(void)
static void test_SetupInstallServicesFromInfSectionExW(void)
static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
static char CURR_DIR[MAX_PATH]
static const char inffile[]
char * strcat(char *DstString, const char *SrcString)
char * strcpy(char *DstString, const char *SrcString)
#define ERROR_CALL_NOT_IMPLEMENTED
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define ERROR_ACCESS_DENIED
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetupInstallServicesFromInfSectionExA(HINF hinf, PCSTR sectionname, DWORD flags, HDEVINFO devinfo, PSP_DEVINFO_DATA devinfo_data, PVOID reserved1, PVOID reserved2)
BOOL WINAPI SetupInstallServicesFromInfSectionExW(HINF hinf, PCWSTR sectionname, DWORD flags, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PVOID reserved1, PVOID reserved2)
HINF WINAPI SetupOpenInfFileA(PCSTR name, PCSTR class, DWORD style, UINT *error)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int WINAPI lstrlenA(LPCSTR lpString)
static void create_inf_file(void)
BOOL WINAPI DeleteService(SC_HANDLE hService)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR lpMachineName, LPCSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
#define SetupInstallServicesFromInfSectionEx
#define ERROR_BAD_SERVICE_INSTALLSECT
#define ERROR_SECTION_NOT_FOUND
STRSAFEAPI StringCbPrintfA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszFormat,...)
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
HHOOK WINAPI SetWindowsHookExA(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)