mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 02:56:09 +00:00
[WINHTTP:USER32]
Make it use apitest.h svn path=/trunk/; revision=60315
This commit is contained in:
parent
f63c233859
commit
2a026800b2
2 changed files with 7 additions and 8 deletions
|
@ -5,14 +5,13 @@
|
||||||
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
|
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define UNICODE
|
#include <apitest.h>
|
||||||
|
|
||||||
#define WIN32_NO_STATUS
|
#define WIN32_NO_STATUS
|
||||||
#define _INC_WINDOWS
|
#define _INC_WINDOWS
|
||||||
#define COM_NO_WINDOWS_H
|
#define COM_NO_WINDOWS_H
|
||||||
#include <windef.h>
|
#include <windef.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <wine/test.h>
|
|
||||||
#include <winhttp.h>
|
#include <winhttp.h>
|
||||||
|
|
||||||
struct hostent *(WINAPI *pgethostbyname)(const char *);
|
struct hostent *(WINAPI *pgethostbyname)(const char *);
|
||||||
|
@ -29,7 +28,7 @@ GetProc(
|
||||||
{
|
{
|
||||||
HMODULE ModuleHandle;
|
HMODULE ModuleHandle;
|
||||||
|
|
||||||
ModuleHandle = GetModuleHandle(L"ws2_32");
|
ModuleHandle = GetModuleHandleW(L"ws2_32");
|
||||||
if (!ModuleHandle)
|
if (!ModuleHandle)
|
||||||
return NULL;
|
return NULL;
|
||||||
return GetProcAddress(ModuleHandle, FunctionName);
|
return GetProcAddress(ModuleHandle, FunctionName);
|
||||||
|
@ -41,14 +40,14 @@ static
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IsWinsockLoaded(VOID)
|
IsWinsockLoaded(VOID)
|
||||||
{
|
{
|
||||||
return GetModuleHandle(L"ws2_32") != NULL;
|
return GetModuleHandleW(L"ws2_32") != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IsWininetLoaded(VOID)
|
IsWininetLoaded(VOID)
|
||||||
{
|
{
|
||||||
return GetModuleHandle(L"wininet") != NULL;
|
return GetModuleHandleW(L"wininet") != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -93,9 +92,9 @@ START_TEST(WinHttpOpen)
|
||||||
ok(!IsWinsockInitialized(), "Winsock initialized on startup\n");
|
ok(!IsWinsockInitialized(), "Winsock initialized on startup\n");
|
||||||
ok(!IsWininetLoaded(), "Wininet loaded on startup\n");
|
ok(!IsWininetLoaded(), "Wininet loaded on startup\n");
|
||||||
|
|
||||||
ModuleHandle = GetModuleHandle(L"winhttp");
|
ModuleHandle = GetModuleHandleW(L"winhttp");
|
||||||
ok_ptr(ModuleHandle, NULL);
|
ok_ptr(ModuleHandle, NULL);
|
||||||
ModuleHandle = LoadLibrary(L"winhttp");
|
ModuleHandle = LoadLibraryW(L"winhttp");
|
||||||
ok(ModuleHandle != NULL, "LoadLibrary failed, error %lu\n", GetLastError());
|
ok(ModuleHandle != NULL, "LoadLibrary failed, error %lu\n", GetLastError());
|
||||||
|
|
||||||
pWinHttpOpen = (PVOID)GetProcAddress(ModuleHandle, "WinHttpOpen");
|
pWinHttpOpen = (PVOID)GetProcAddress(ModuleHandle, "WinHttpOpen");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define __ROS_LONG64__
|
#define __ROS_LONG64__
|
||||||
|
|
||||||
#define STANDALONE
|
#define STANDALONE
|
||||||
#include <wine/test.h>
|
#include <apitest.h>
|
||||||
|
|
||||||
extern void func_WinHttpOpen(void);
|
extern void func_WinHttpOpen(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue