- No need now to declare a NTSTATUS ExceptionStatus; variable to be able to use StartSeh() / EndSeh() macros; this is done automagically.
- Use explicitely unicode macros where it's needed.
svn path=/trunk/; revision=60319
START_TEST(SaferIdentifyLevel)
{
- NTSTATUS ExceptionStatus;
BOOL ret;
DWORD error;
SAFER_LEVEL_HANDLE handle;
START_TEST(_vsnprintf)
{
char buffer[255];
- NTSTATUS ExceptionStatus;
+
/* Here you can mix wide and ANSI strings */
call_varargs(buffer, 255, 12, "%S world!", L"hello");
call_varargs(buffer, 255, 12, "%s world!", "hello");
START_TEST(_vsnwprintf)
{
wchar_t buffer[255];
- NTSTATUS ExceptionStatus;
+
/* Test basic functionality */
call_varargs(buffer, 255, 19, L"%s world!", "hello");
call_varargs(buffer, 255, 12, L"%s world!", L"hello");
* user32's wsprintf. Make sure to test them all */
START_TEST(sprintf)
{
- NTSTATUS ExceptionStatus;
int Length;
CHAR Buffer[128];
PCHAR String;
#include <apitest.h>
#include <wingdi.h>
-#include <libs/pseh/pseh2.h>
void Test_AddFontResourceExW()
{
#include <wingdi.h>
#include <winuser.h>
-#include <pseh/pseh2.h>
#include "init.h"
#include <wingdi.h>
#include <winddi.h>
#include <winuser.h>
-#include <pseh/pseh2.h>
#include <include/ntgdityp.h>
#include <include/ntgdihdl.h>
#include <wingdi.h>
#include <winddi.h>
#include <winuser.h>
-#include <pseh/pseh2.h>
#include <include/ntgdityp.h>
#include <include/ntgdihdl.h>
#include <apitest.h>
#include <wingdi.h>
-#include <pseh/pseh2.h>
void Test_Set(ULONG ulLine, HDC hdc, INT x, INT y, LPPOINT ppt, BOOL bExp, DWORD dwErrExp)
{
// #define __ROS_LONG64__
-#define WIN32_NO_STATUS
-
/* The user must #define STANDALONE if it uses this header in testlist.c */
+#define WIN32_NO_STATUS
#include <wine/test.h>
+#undef WIN32_NO_STATUS
+
#include <pseh/pseh2.h>
/* See kmtests/include/kmt_test.h */
#define InvalidPointer ((PVOID)0x5555555555555555ULL)
+// #define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
#define StartSeh() \
- ExceptionStatus = STATUS_SUCCESS; \
+{ \
+ NTSTATUS ExceptionStatus = STATUS_SUCCESS; \
_SEH2_TRY \
{
+
#define EndSeh(ExpectedStatus) \
} \
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) \
ExceptionStatus = _SEH2_GetExceptionCode(); \
} \
_SEH2_END; \
- ok(ExceptionStatus == ExpectedStatus, "Exception 0x%08lx, expected 0x%08lx\n", ExceptionStatus, ExpectedStatus)
+ ok(ExceptionStatus == ExpectedStatus, \
+ "Exception 0x%08lx, expected 0x%08lx\n", \
+ ExceptionStatus, ExpectedStatus); \
+}
#endif /* _APITEST_H */
* PROGRAMMER: Timo Kreuzer
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/ldrfuncs.h>
typedef struct _TEST_RESOURCES
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
-#include <pseh/pseh2.h>
static PVOID Allocations[4096] = { NULL };
static ULONG CurrentAllocation = 0;
+
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/pstypes.h>
#include <ndk/mmfuncs.h>
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/ntndk.h>
-#include <pseh/pseh2.h>
NTSYSAPI
NTSTATUS
* PURPOSE: Test for the NtProtectVirtualMemory API
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
-#include <pseh/pseh2.h>
-
-#define StartSeh status = STATUS_SUCCESS; _SEH2_TRY
-#define EndSeh(ExpectedStatus) _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { status = _SEH2_GetExceptionCode(); } _SEH2_END; ok(status == ExpectedStatus, "Exception %lx, expected %lx\n", status, ExpectedStatus)
START_TEST(NtProtectVirtualMemory)
{
ok(NT_SUCCESS(status), "Commiting memory failed\n");
/* Try writing it */
- StartSeh
+ StartSeh()
{
*allocationStart = 0xFF;
} EndSeh(STATUS_SUCCESS);
/* Try reading it */
- StartSeh
+ StartSeh()
{
ok(*allocationStart == 0xFF, "Memory was not written\n");
} EndSeh(STATUS_SUCCESS);
ok(oldProtection == PAGE_READWRITE, "Expected PAGE_READWRITE, got %08x.\n", oldProtection);
/* Try writing it */
- StartSeh
+ StartSeh()
{
*allocationStart = 0xAA;
} EndSeh(STATUS_ACCESS_VIOLATION);
/* Try reading it */
- StartSeh
+ StartSeh()
{
ok(*allocationStart == 0xFF, "read-only memory were changed.\n");
} EndSeh(STATUS_SUCCESS);
ok(oldProtection == PAGE_READONLY, "Expected PAGE_READONLY, got %08x.\n", oldProtection);
/* Try writing it */
- StartSeh
+ StartSeh()
{
*allocationStart = 0xAA;
} EndSeh(STATUS_ACCESS_VIOLATION);
/* Try reading it */
- StartSeh
+ StartSeh()
{
ok(*allocationStart == 0, "Test should not go as far as this.\n");
} EndSeh(STATUS_ACCESS_VIOLATION);
* PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca@sfr.fr>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/setypes.h>
#include <ndk/rtlfuncs.h>
#include <ndk/exfuncs.h>
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/rtlfuncs.h>
-#include <pseh/pseh2.h>
void
Test_RtlFindMostSignificantBit(void)
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/mmfuncs.h>
#include <ndk/rtlfuncs.h>
ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
}
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
START_TEST(RtlDetermineDosPathNameType)
{
- NTSTATUS ExceptionStatus;
RTL_PATH_TYPE PathType;
struct
{
if (!RtlDetermineDosPathNameType_Ustr)
{
- RtlDetermineDosPathNameType_Ustr = (PVOID)GetProcAddress(GetModuleHandle(L"ntdll"), "RtlDetermineDosPathNameType_Ustr");
+ RtlDetermineDosPathNameType_Ustr = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlDetermineDosPathNameType_Ustr");
if (!RtlDetermineDosPathNameType_Ustr)
skip("RtlDetermineDosPathNameType_Ustr unavailable\n");
}
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
#include <stdio.h>
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
#define ok_bool_file(value, expected, file) do { \
if (expected) \
ok(value == TRUE, "File '%ls' should exist, but does not\n", file); \
START_TEST(RtlDoesFileExists)
{
- NTSTATUS ExceptionStatus;
BOOLEAN Ret;
struct
{
if (!RtlDoesFileExists_UEx)
{
- RtlDoesFileExists_UEx = (PVOID)GetProcAddress(GetModuleHandle(L"ntdll"), "RtlDoesFileExists_UEx");
+ RtlDoesFileExists_UEx = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlDoesFileExists_UEx");
if (!RtlDoesFileExists_UEx)
skip("RtlDoesFileExists_UEx unavailable\n");
}
if (!RtlDoesFileExists_UStr)
{
- RtlDoesFileExists_UStr = (PVOID)GetProcAddress(GetModuleHandle(L"ntdll"), "RtlDoesFileExists_UStr");
+ RtlDoesFileExists_UStr = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlDoesFileExists_UStr");
if (!RtlDoesFileExists_UStr)
skip("RtlDoesFileExists_UStr unavailable\n");
}
if (!RtlDoesFileExists_UstrEx)
{
- RtlDoesFileExists_UstrEx = (PVOID)GetProcAddress(GetModuleHandle(L"ntdll"), "RtlDoesFileExists_UstrEx");
+ RtlDoesFileExists_UstrEx = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlDoesFileExists_UstrEx");
if (!RtlDoesFileExists_UstrEx)
skip("RtlDoesFileExists_UstrEx unavailable\n");
}
swprintf(FileName, L"C:\\%ls", CustomPath);
/* Make sure this directory doesn't exist */
- while (GetFileAttributes(FileName) != INVALID_FILE_ATTRIBUTES)
+ while (GetFileAttributesW(FileName) != INVALID_FILE_ATTRIBUTES)
{
wcscat(CustomPath, L"X");
swprintf(FileName, L"C:\\%ls", CustomPath);
}
- Success = CreateDirectory(FileName, NULL);
+ Success = CreateDirectoryW(FileName, NULL);
ok(Success, "CreateDirectory failed, results might not be accurate\n");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists", CustomPath);
- Success = CreateDirectory(FileName, NULL);
+ Success = CreateDirectoryW(FileName, NULL);
ok(Success, "CreateDirectory failed, results might not be accurate\n");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists\\ThisFileExists", CustomPath);
- Handle = CreateFile(FileName, 0, 0, NULL, CREATE_NEW, 0, NULL);
+ Handle = CreateFileW(FileName, 0, 0, NULL, CREATE_NEW, 0, NULL);
ok(Handle != INVALID_HANDLE_VALUE, "CreateFile failed, results might not be accurate\n");
if (Handle != INVALID_HANDLE_VALUE)
{
}
swprintf(FileName, L"C:\\%ls\\ThisFolderExists\\ThisFileExists", CustomPath);
- Success = DeleteFile(FileName);
+ Success = DeleteFileW(FileName);
ok(Success, "DeleteFile failed, test might leave stale file\n");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists", CustomPath);
- Success = RemoveDirectory(FileName);
+ Success = RemoveDirectoryW(FileName);
ok(Success, "RemoveDirectory failed, test might leave stale directory\n");
swprintf(FileName, L"C:\\%ls", CustomPath);
- Success = RemoveDirectory(FileName);
+ Success = RemoveDirectoryW(FileName);
ok(Success, "RemoveDirectory failed, test might leave stale directory\n");
}
# include <stdio.h>
# include <stddef.h>
#else /* Compile for ReactOS or wine */
+# include <apitest.h>
# define WIN32_NO_STATUS
# include <stdio.h>
-# include <wine/test.h>
-# include <pseh/pseh2.h>
# include <ndk/rtlfuncs.h>
#endif
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
#include <stdio.h>
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
/*
);
*/
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
static
BOOLEAN
CheckStringBuffer(
return TRUE;
}
-#define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
-
START_TEST(RtlDosSearchPath_U)
{
- NTSTATUS ExceptionStatus;
ULONG Length = 0;
WCHAR Buffer[MAX_PATH];
PWSTR PartName;
swprintf(FileName, L"C:\\%ls", CustomPath);
/* Make sure this directory doesn't exist */
- while (GetFileAttributes(FileName) != INVALID_FILE_ATTRIBUTES)
+ while (GetFileAttributesW(FileName) != INVALID_FILE_ATTRIBUTES)
{
wcscat(CustomPath, L"X");
swprintf(FileName, L"C:\\%ls", CustomPath);
}
- Success = CreateDirectory(FileName, NULL);
+ Success = CreateDirectoryW(FileName, NULL);
ok(Success, "CreateDirectory failed, results might not be accurate\n");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists", CustomPath);
- Success = CreateDirectory(FileName, NULL);
+ Success = CreateDirectoryW(FileName, NULL);
ok(Success, "CreateDirectory failed, results might not be accurate\n");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists\\ThisFileExists", CustomPath);
- Handle = CreateFile(FileName, 0, 0, NULL, CREATE_NEW, 0, NULL);
+ Handle = CreateFileW(FileName, 0, 0, NULL, CREATE_NEW, 0, NULL);
ok(Handle != INVALID_HANDLE_VALUE, "CreateFile failed, results might not be accurate\n");
if (Handle != INVALID_HANDLE_VALUE)
CloseHandle(Handle);
/* Empty path string searches in current directory */
swprintf(FileName, L"C:\\%ls\\ThisFolderExists", CustomPath);
- Success = SetCurrentDirectory(FileName);
+ Success = SetCurrentDirectoryW(FileName);
ok(Success, "SetCurrentDirectory failed\n");
PartName = InvalidPointer;
RtlFillMemory(Buffer, sizeof(Buffer), 0x55);
ok(Okay, "CheckStringBuffer failed\n");
/* Clean up test folder */
- SetCurrentDirectory(L"C:\\");
+ SetCurrentDirectoryW(L"C:\\");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists\\ThisFileExists", CustomPath);
- Success = DeleteFile(FileName);
+ Success = DeleteFileW(FileName);
ok(Success, "DeleteFile failed, test might leave stale file\n");
swprintf(FileName, L"C:\\%ls\\ThisFolderExists", CustomPath);
- Success = RemoveDirectory(FileName);
+ Success = RemoveDirectoryW(FileName);
ok(Success, "RemoveDirectory failed %(lu), test might leave stale directory\n", GetLastError());
swprintf(FileName, L"C:\\%ls", CustomPath);
- Success = RemoveDirectory(FileName);
+ Success = RemoveDirectoryW(FileName);
ok(Success, "RemoveDirectory failed (%lu), test might leave stale directory\n", GetLastError());
}
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
/*
);
*/
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
#define ok_eq_ulong(value, expected) ok((value) == (expected), #value " = %lu, expected %lu\n", value, expected)
#define ok_eq_hex(value, expected) ok((value) == (expected), #value " = 0x%lx, expected 0x%lx\n", value, expected)
#define ok_eq_pointer(value, expected) ok((value) == (expected), #value " = %p, expected %p\n", value, expected)
ok((str1)->MaximumLength == (str2)->MaximumLength, "MaximumLength modified\n"); \
} while (0)
-#define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
-
START_TEST(RtlDosSearchPath_Ustr)
{
- NTSTATUS ExceptionStatus;
NTSTATUS Status;
UNICODE_STRING PathString;
UNICODE_STRING FileNameString;
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
/*
);
*/
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
static
BOOLEAN
CheckStringBuffer(
return Result;
}
-#define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
-
/* winetest_platform is "windows" for us, so broken() doesn't do what it should :( */
#undef broken
#define broken(x) 0
{ L"\\\\??\\C:\\test", PrefixNone, L"\\\\??\\C:\\test", PrefixNone, sizeof(L"\\\\??\\C:\\") },
{ L"\\\\??\\C:\\test\\", PrefixNone, L"\\\\??\\C:\\test\\" },
};
- NTSTATUS ExceptionStatus;
WCHAR FullPathNameBuffer[MAX_PATH];
PWSTR ShortName;
SIZE_T Length;
START_TEST(RtlGetFullPathName_U)
{
- NTSTATUS ExceptionStatus;
PCWSTR FileName;
PWSTR ShortName;
ULONG Length;
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
/*
//= (PVOID)0x7769a3dd // win7 sp1 wow64
;
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
#define ok_eq_ustr(str1, str2) do { \
ok((str1)->Buffer == (str2)->Buffer, "Buffer modified\n"); \
ok((str1)->Length == (str2)->Length, "Length modified\n"); \
}
#define RtlPathTypeNotSet 123
-#define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
/* winetest_platform is "windows" for us, so broken() doesn't do what it should :( */
#undef broken
{ L"\\\\??\\C:\\test", PrefixNone, L"\\\\??\\C:\\test", RtlPathTypeUncAbsolute, PrefixNone, sizeof(L"\\\\??\\C:\\") },
{ L"\\\\??\\C:\\test\\", PrefixNone, L"\\\\??\\C:\\test\\", RtlPathTypeUncAbsolute },
};
- NTSTATUS ExceptionStatus;
ULONG Length;
UNICODE_STRING FileName;
WCHAR FullPathNameBuffer[MAX_PATH];
START_TEST(RtlGetFullPathName_Ustr)
{
- NTSTATUS ExceptionStatus;
ULONG Length;
UNICODE_STRING FileName;
UNICODE_STRING TempString;
if (!RtlGetFullPathName_Ustr)
{
- RtlGetFullPathName_Ustr = (PVOID)GetProcAddress(GetModuleHandle(L"ntdll"), "RtlGetFullPathName_Ustr");
+ RtlGetFullPathName_Ustr = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlGetFullPathName_Ustr");
if (!RtlGetFullPathName_Ustr)
{
skip("RtlGetFullPathName_Ustr unavailable\n");
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#define UNICODE
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
/*
OUT PSIZE_T LengthNeeded OPTIONAL
);
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
#define ok_eq_ustr(str1, str2) do { \
ok((str1)->Buffer == (str2)->Buffer, "Buffer modified\n"); \
ok((str1)->Length == (str2)->Length, "Length modified\n"); \
}
#define RtlPathTypeNotSet 123
-#define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
/* winetest_platform is "windows" for us, so broken() doesn't do what it should :( */
#undef broken
{ L"\\\\??\\C:\\test", PrefixNone, L"\\\\??\\C:\\test", RtlPathTypeUncAbsolute, PrefixNone, sizeof(L"\\\\??\\C:\\") },
{ L"\\\\??\\C:\\test\\", PrefixNone, L"\\\\??\\C:\\test\\", RtlPathTypeUncAbsolute },
};
- NTSTATUS Status, ExceptionStatus;
+ NTSTATUS Status;
UNICODE_STRING FileName;
UNICODE_STRING FullPathName;
WCHAR FullPathNameBuffer[MAX_PATH];
START_TEST(RtlGetFullPathName_UstrEx)
{
- NTSTATUS Status, ExceptionStatus;
+ NTSTATUS Status;
UNICODE_STRING FileName;
UNICODE_STRING TempString;
UNICODE_STRING StaticString;
SIZE_T LengthNeeded;
BOOLEAN Okay;
- pRtlGetFullPathName_UstrEx = (PVOID)GetProcAddress(GetModuleHandle(L"ntdll"), "RtlGetFullPathName_UstrEx");
+ pRtlGetFullPathName_UstrEx = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlGetFullPathName_UstrEx");
if (!pRtlGetFullPathName_UstrEx)
{
skip("RtlGetFullPathName_UstrEx unavailable\n");
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/rtlfuncs.h>
/*
* PROGRAMMERS: Timo Kreuzer
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/rtlfuncs.h>
void Test_RtlInitializeBitmap()
* PROGRAMMERS: Timo Kreuzer
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/exfuncs.h>
void
* PROGRAMMER: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
-#include <wine/test.h>
#include <ndk/ketypes.h>
#include <ndk/kefuncs.h>
* PROGRAMMER:
*/
+#include <apitest.h>
+
#include <setjmp.h>
#include <time.h>
-#include <wine/test.h>
#ifdef _M_IX86
#define ZWC_SEGMENT_BITS (0xFFFF)
* PROGRAMMER: Timo Kreuzer
*/
+#include <apitest.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <math.h>
#include <stdarg.h>
-#include <wine/test.h>
#include <windows.h>
#define __ROS_LONG64__
#define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
extern void func_LdrEnumResources(void);
extern void func_NtAllocateVirtualMemory(void);
-add_definitions(
- -D__ROS_LONG64__
- -D_UNICODE -DUNICODE)
-
add_executable(powrprof_apitest power.c testlist.c)
set_module_type(powrprof_apitest win32cui)
add_importlibs(powrprof_apitest advapi32 powrprof msvcrt kernel32 ntdll)
* Martin Rottensteiner
*/
+#include <apitest.h>
+
#include <stdarg.h>
#include <ntstatus.h>
#define WIN32_NO_STATUS
-#define STANDALONE
-#include <wine/test.h>
#include <winreg.h>
#include <powrprof.h>
-/* Automatically generated file; DO NOT EDIT!! */
+#define __ROS_LONG64__
-/* stdarg.h is needed for Winelib */
-//#include <stdarg.h>
-//#include <stdio.h>
-//#include <stdlib.h>
-//#include "windef.h"
-//#include "winbase.h"
-
-struct test
-{
- const char *name;
- void (*func)(void);
-};
+#define STANDALONE
+#include <apitest.h>
extern void func_power(void);
const struct test winetest_testlist[] =
{
- { "power", func_power },
- { 0, 0 }
+ { "power", func_power },
+ { 0, 0 }
};
-
-#define WINETEST_WANT_MAIN
-#include <wine/test.h>
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <windef.h>
#include <winsock2.h>
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
static
PVOID
AllocateGuarded(
START_TEST(WSAStartup)
{
- NTSTATUS ExceptionStatus;
BOOLEAN Okay;
LPWSADATA WsaData;
int Error;
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
+#include <apitest.h>
+
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <windef.h>
#include <winbase.h>
#include <ws2tcpip.h>
-#include <wine/test.h>
-#include <pseh/pseh2.h>
#include <ndk/umtypes.h>
-#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
#define ok_addrinfo(ai, flags, family, socktype, protocol, addrlen) do \
{ \
ok_hex((ai)->ai_flags, flags); \
ok_dec(((SOCKADDR_IN *)(sockaddr))->sin_zero[_i], 0); \
} while (0)
-#define InvalidPointer ((PVOID)0x5555555555555555ULL)
-
CHAR LocalAddress[sizeof("255.255.255.255")];
static
int Error;
PADDRINFOA AddrInfo;
ADDRINFOA Hints;
- NTSTATUS ExceptionStatus;
struct
{
PCSTR NodeName;
int Error;
PADDRINFOA AddrInfo;
ADDRINFOA Hints;
- NTSTATUS ExceptionStatus;
struct
{
PCSTR ServiceName;
int Error;
PADDRINFOA AddrInfo;
ADDRINFOA Hints;
- NTSTATUS ExceptionStatus;
CHAR LocalHostName[128];
struct hostent *Hostent;
* COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
*/
-#include <stdio.h>
-#include <wine/test.h>
+#include <apitest.h>
+#include <stdio.h>
#include "ws2_32.h"
int CreateSocket(SOCKET* psck)
* PROGRAMMERS: Colin Finck
*/
-#include <stdio.h>
-#include <wine/test.h>
+#include <apitest.h>
+#include <stdio.h>
#include "ws2_32.h"
int Test_ioctlsocket()
* PROGRAMMERS: Colin Finck
*/
+#include <apitest.h>
+
#include <stdio.h>
-#include <wine/test.h>
+#include <ntstatus.h>
#include <winternl.h>
#include "ws2_32.h"
#define __ROS_LONG64__
#define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
extern void func_getaddrinfo(void);
extern void func_ioctlsocket(void);