Author: dquintana Date: Mon Jul 24 10:34:06 2017 New Revision: 75392
URL: http://svn.reactos.org/svn/reactos?rev=75392&view=rev Log: [MSPAINT] Correct callback return type (Fixes X64 build).
[USETUP] Correct definition of the struct (fixes X64 build).
[USBPORT] Improve struct size checks so they are X64-compatible (fixes X64 build).
The build as a whole still fails due to bootlib, but implementing those is beyond my expertise.
Modified: trunk/reactos/base/applications/mspaint/main.cpp trunk/reactos/base/setup/usetup/inffile.h trunk/reactos/drivers/usb/usbport/usbport.h trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h
Modified: trunk/reactos/base/applications/mspaint/main.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/m... ============================================================================== --- trunk/reactos/base/applications/mspaint/main.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/main.cpp [iso-8859-1] Mon Jul 24 10:34:06 2017 @@ -111,7 +111,7 @@ }
// Hook procedure for OPENFILENAME to change the file name extension -static UINT APIENTRY +static UINT_PTR APIENTRY OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { HWND hParent;
Modified: trunk/reactos/base/setup/usetup/inffile.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/inffile.h... ============================================================================== --- trunk/reactos/base/setup/usetup/inffile.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/inffile.h [iso-8859-1] Mon Jul 24 10:34:06 2017 @@ -45,10 +45,10 @@ * Delete it once we don't use inflib anymore */ typedef struct _INFCONTEXT { - PVOID Inf; - PVOID CurrentInf; - PVOID Section; - PVOID Line; + HINF Inf; + HINF CurrentInf; + UINT Section; + UINT Line; } INFCONTEXT; C_ASSERT(sizeof(INFCONTEXT) == 2 * sizeof(PVOID) + 2 * sizeof(UINT));
Modified: trunk/reactos/drivers/usb/usbport/usbport.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbport/usbport... ============================================================================== --- trunk/reactos/drivers/usb/usbport/usbport.h [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbport/usbport.h [iso-8859-1] Mon Jul 24 10:34:06 2017 @@ -355,7 +355,12 @@ KSPIN_LOCK SetPowerD0SpinLock; KDPC WorkerRequestDpc; KDPC HcWakeDpc; - ULONG Padded[34]; // Miniport extension should be aligned on 0x100 + + /* Miniport extension should be aligned on 0x100 */ +#if !defined(_M_X64) + ULONG Padded[34]; +#endif + } USBPORT_DEVICE_EXTENSION, *PUSBPORT_DEVICE_EXTENSION;
C_ASSERT(sizeof(USBPORT_DEVICE_EXTENSION) == 0x400); @@ -392,7 +397,7 @@ ULONG CallbackContext; } USBPORT_ASYNC_CALLBACK_DATA, *PUSBPORT_ASYNC_CALLBACK_DATA;
-C_ASSERT(sizeof(USBPORT_ASYNC_CALLBACK_DATA) == 88); +C_ASSERT(sizeof(USBPORT_ASYNC_CALLBACK_DATA) == 84 + sizeof(PVOID));
typedef struct _TIMER_WORK_QUEUE_ITEM { WORK_QUEUE_ITEM WqItem;
Modified: trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/drivers... ============================================================================== --- trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h [iso-8859-1] Mon Jul 24 10:34:06 2017 @@ -62,7 +62,7 @@ UCHAR Reserved3; } USBPORT_RESOURCES, *PUSBPORT_RESOURCES;
-C_ASSERT(sizeof(USBPORT_RESOURCES) == 52); +C_ASSERT(sizeof(USBPORT_RESOURCES) == 40 + 3 * sizeof(PVOID));
typedef ULONG MPSTATUS; // Miniport status typedef ULONG RHSTATUS; // Roothub status @@ -578,7 +578,7 @@ USBPORT_REGISTRATION_PACKET Packet; } USBPORT_MINIPORT_INTERFACE, *PUSBPORT_MINIPORT_INTERFACE;
-C_ASSERT(sizeof(USBPORT_MINIPORT_INTERFACE) == 336); +C_ASSERT(sizeof(USBPORT_MINIPORT_INTERFACE) == 332 + 3 * sizeof(PVOID));
#define USBPORT_TRANSFER_DIRECTION_OUT 1 // From host to device typedef struct _USBPORT_ENDPOINT_PROPERTIES { @@ -617,7 +617,7 @@ ULONG Reserved2; } USBPORT_SCATTER_GATHER_ELEMENT, *PUSBPORT_SCATTER_GATHER_ELEMENT;
-C_ASSERT(sizeof(USBPORT_SCATTER_GATHER_ELEMENT) == 24); +C_ASSERT(sizeof(USBPORT_SCATTER_GATHER_ELEMENT) == 20 + sizeof(PVOID));
typedef struct _USBPORT_SCATTER_GATHER_LIST { ULONG Flags; @@ -627,7 +627,7 @@ USBPORT_SCATTER_GATHER_ELEMENT SgElement[1]; } USBPORT_SCATTER_GATHER_LIST, *PUSBPORT_SCATTER_GATHER_LIST;
-C_ASSERT(sizeof(USBPORT_SCATTER_GATHER_LIST) == 40); +C_ASSERT(sizeof(USBPORT_SCATTER_GATHER_LIST) == 36 + sizeof(PVOID));
typedef struct _USBPORT_TRANSFER_PARAMETERS { ULONG TransferFlags;