From a2cf243776976d47996ee7259e578ba59fe0eaf8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 9 Jan 2009 14:03:57 +0100 Subject: [PATCH] include: Fix packing of the setupapi structures. --- dlls/setupapi/tests/devinst.c | 6 ------ include/setupapi.h | 10 +++++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 78b2ca3ec3..9a5b1fc613 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -833,12 +833,6 @@ static void testGetDeviceInterfaceDetail(void) "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); detail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A); SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail, - size, &size, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, - "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); - /* Windows 2000 and up check for the exact size */ - detail->cbSize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath[1]); ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail, size, &size, NULL); ok(ret, "SetupDiGetDeviceInterfaceDetailA failed: %d\n", diff --git a/include/setupapi.h b/include/setupapi.h index 820c5c4f65..b36243ab1d 100644 --- a/include/setupapi.h +++ b/include/setupapi.h @@ -22,8 +22,10 @@ #include -#ifdef __cplusplus -extern "C" { +#ifdef _WIN64 +#include +#else +#include #endif /* setupapi doesn't use the normal convention, it adds an underscore before A/W */ @@ -1848,8 +1850,6 @@ BOOL WINAPI UnmapAndCloseFile(HANDLE, HANDLE, PVOID); #undef DECL_WINELIB_SETUPAPI_TYPE_AW -#ifdef __cplusplus -} -#endif +#include #endif /* _INC_SETUPAPI */