[DDK] Hack the IDmaChannel::PhysicalAddress ABI

This commit is contained in:
Bryan Kirk 2022-01-23 08:57:08 -05:00 committed by Victor Perevertkin
parent 3d9ef5c7e7
commit 0944f808f8
No known key found for this signature in database
GPG key ID: C750B7222E9C7830

View file

@ -704,6 +704,16 @@ typedef IUnregisterPhysicalConnection *PUNREGISTERPHYSICALCONNECTION;
IDmaChannel Interface
*/
/* C++ ABI HACK: IDmaChannel::PhysicalAddress */
#if defined(__cplusplus) && !defined(_MSC_VER)
#define DEFINE_ABSTRACT_DMACHANNEL_PhysicalAddress \
STDMETHOD_(PHYSICAL_ADDRESS*, PhysicalAddress)( THIS_ PHYSICAL_ADDRESS* pRet ) PURE; \
PHYSICAL_ADDRESS PhysicalAddress() { PHYSICAL_ADDRESS tmp; PhysicalAddress(&tmp); return tmp; }
#else
#define DEFINE_ABSTRACT_DMACHANNEL_PhysicalAddress \
STDMETHOD_(PHYSICAL_ADDRESS, PhysicalAddress)( THIS ) PURE
#endif
#define DEFINE_ABSTRACT_DMACHANNEL() \
STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \
IN ULONG BufferSize, \