10#define WIN32_NO_STATUS
21#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
25 const DWORD cElements = 2;
37 PCWSTR pwszStrings[] = {
L"PortName",
L"MonitorName",
L"Description" };
39 DWORD fPortType = 1337;
63 pPortInfoEnd = (
PBYTE)pPortInfo2 + cbPortInfo2Size;
65 (&pPortInfo2[0])->fPortType = fPortType;
69 (&pPortInfo2[1])->fPortType = fPortType + 1;
75 CopyMemory(pPortInfo2Copy, pPortInfo2, cbPortInfo2Size);
83 ok((&pPortInfo2[0])->fPortType == fPortType,
"fPortType is %lu!\n", (&pPortInfo2[0])->fPortType);
85 ok((&pPortInfo2[1])->fPortType == fPortType + 1,
"fPortType is %lu!\n", (&pPortInfo2[1])->fPortType);
89 ok((
ULONG_PTR)(&pPortInfo2[0])->pPortName == ((
ULONG_PTR)(&pPortInfo2Copy[0])->pPortName - (
ULONG_PTR)(&pPortInfo2[0])),
"pPortName is %p!\n", (&pPortInfo2[0])->pPortName);
90 ok((
ULONG_PTR)(&pPortInfo2[0])->pMonitorName == ((
ULONG_PTR)(&pPortInfo2Copy[0])->pMonitorName - (
ULONG_PTR)(&pPortInfo2[0])),
"pMonitorName is %p!\n", (&pPortInfo2[0])->pMonitorName);
91 ok((
ULONG_PTR)(&pPortInfo2[0])->pDescription == ((
ULONG_PTR)(&pPortInfo2Copy[0])->pDescription - (
ULONG_PTR)(&pPortInfo2[0])),
"pDescription is %p!\n", (&pPortInfo2[0])->pDescription);
92 ok((
ULONG_PTR)(&pPortInfo2[1])->pPortName == ((
ULONG_PTR)(&pPortInfo2Copy[1])->pPortName - (
ULONG_PTR)(&pPortInfo2[1])),
"pPortName is %p!\n", (&pPortInfo2[1])->pPortName);
93 ok((
ULONG_PTR)(&pPortInfo2[1])->pMonitorName == ((
ULONG_PTR)(&pPortInfo2Copy[1])->pMonitorName - (
ULONG_PTR)(&pPortInfo2[1])),
"pMonitorName is %p!\n", (&pPortInfo2[1])->pMonitorName);
94 ok((
ULONG_PTR)(&pPortInfo2[1])->pDescription == ((
ULONG_PTR)(&pPortInfo2Copy[1])->pDescription - (
ULONG_PTR)(&pPortInfo2[1])),
"pDescription is %p!\n", (&pPortInfo2[1])->pDescription);
99 CopyMemory(pPortInfo2Test, pPortInfo2, cbPortInfo2Size);
114 ok(
RtlEqualMemory(pPortInfo2, pPortInfo2Copy, cbPortInfo2Size),
"pPortInfo2 and pPortInfo2Copy are not equal after marshalling down and up!\n");
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define RtlEqualMemory(dst, src, len)
BOOL WINAPI MarshallUpStructuresArray(DWORD cbSize, PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO *pInfo, DWORD cbStructureSize, BOOL bSomeBoolean)
BOOL WINAPI MarshallDownStructuresArray(PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO *pInfo, DWORD cbStructureSize, BOOL bSomeBoolean)
#define FIELD_OFFSET(t, f)
static const MARSHALLING * pPortInfoMarshalling[]
static DWORD dwPortInfo2Offsets[]
DWORD WINAPI GetLastError(void)
_Reserved_ PVOID Reserved
#define ERROR_INVALID_DATA
struct _PORT_INFO_2W * PPORT_INFO_2W
struct _PORT_INFO_2W PORT_INFO_2W