mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 20:50:29 +00:00
[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. svn path=/trunk/; revision=75392
This commit is contained in:
parent
dbcb280e05
commit
cdf1fc5784
4 changed files with 16 additions and 11 deletions
|
@ -111,7 +111,7 @@ FileExtFromFilter(LPTSTR pExt, LPCTSTR pTitle, OPENFILENAME *pOFN)
|
|||
}
|
||||
|
||||
// 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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -355,7 +355,12 @@ typedef struct _USBPORT_DEVICE_EXTENSION {
|
|||
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 @@ typedef struct _USBPORT_ASYNC_CALLBACK_DATA {
|
|||
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;
|
||||
|
|
|
@ -62,7 +62,7 @@ typedef struct _USBPORT_RESOURCES {
|
|||
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 @@ typedef struct _USBPORT_MINIPORT_INTERFACE {
|
|||
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 @@ typedef struct _USBPORT_SCATTER_GATHER_ELEMENT {
|
|||
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 @@ typedef struct _USBPORT_SCATTER_GATHER_LIST {
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue