32#define RASAPI32_GET_PROC(func) \
33 p ## func = (void*)GetProcAddress(hmodule, #func); \
35 trace("GetProcAddress(%s) failed\n", #func);
51 if(!pRasEnumDevicesA) {
52 win_skip(
"Skipping RasEnumDevicesA tests, function not present\n");
60 win_skip(
"RAS configuration problem\n");
64 win_skip(
"RasEnumDevicesA found nothing to enumerate\n");
69 "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n",
result);
74 win_skip(
"failed to allocate buffer for RasEnumDevicesA tests\n");
80 cDevices = 0xdeadbeef;
82 ok(0 < cDevices && cDevices < 32,
"expected 0 < cDevices < 32, got %u\n", cDevices);
85 "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n",
result);
89 cDevices = 0xdeadbeef;
90 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
91 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
94 "Expected ERROR_INVALID_SIZE, got %08d\n",
result);
98 cDevices = 0xdeadbeef;
99 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
100 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
103 "Expected ERROR_INVALID_SIZE, got %08d\n",
result);
107 cDevices = 0xdeadbeef;
108 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
109 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
112 "Expected ERROR_INVALID_SIZE, got %08d\n",
result);
116 cDevices = 0xdeadbeef;
117 result = pRasEnumDevicesA(rasDevInfo,
NULL, &cDevices);
118 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
120 "Expected ERROR_INVALID_PARAMETER, got %08d\n",
result);
124 cDevices = 0xdeadbeef;
125 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
127 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
130 "Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d\n",
result);
134 cDevices = 0xdeadbeef;
135 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
136 ok(0 < cDevices && cDevices < 32,
"expected 0 < cDevices < 32, got %u\n", cDevices);
138 "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n",
result);
142 cDevices = 0xdeadbeef;
143 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
144 ok(0 < cDevices && cDevices < 32,
"expected 0 < cDevices < 32, got %u\n", cDevices);
146 "Expected ERROR_SUCCESS, got %08d\n",
result);
153 "Expected ERROR_INVALID_PARAMETER, got %08d\n",
result);
156 cDevices = 0xdeadbeef;
158 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
160 "Expected ERROR_INVALID_PARAMETER, got %08d\n",
result);
165 "Expected ERROR_INVALID_PARAMETER, got %08d\n",
result);
169 cDevices = 0xdeadbeef;
170 result = pRasEnumDevicesA(rasDevInfo, &
cb, &cDevices);
171 ok(cDevices == 0xdeadbeef,
"expected cDevices = 0xdeadbeef, got %u\n", cDevices);
174 "Expected ERROR_INVALID_SIZE, got %08d\n",
result);
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA lpRasDevinfo, LPDWORD lpcb, LPDWORD lpcDevices)
GLenum GLuint GLsizei bufsize
static HMODULE MODULEINFO DWORD cb
static void test_rasenum(void)
static void InitFunctionPtrs(void)
#define RASAPI32_GET_PROC(func)
struct tagRASDEVINFOA * LPRASDEVINFOA
struct tagRASDEVINFOA RASDEVINFOA
#define ERROR_STATE_MACHINES_NOT_STARTED
#define ERROR_INVALID_SIZE
#define ERROR_RASMAN_CANNOT_INITIALIZE
#define ERROR_BUFFER_TOO_SMALL
#define ERROR_INVALID_USER_BUFFER