这个如何转化?DWORD CPciFunction::m_ReadConfigSpaceDword(ULONG ulBus, ULONG ulDevice, ULONG ulFunction, ULONG ulDwordOffset)
{
READ_CONFIG_SPACE_DWORD_INPARAMS InParams;
InParams.ulBus = ulBus;
InParams.ulDevice = ulDevice;
InParams.ulFunction = ulFunction;
InParams.ulDwordOffset = ulDwordOffset;
// These are the out parameters.
READ_CONFIG_SPACE_DWORD_OUTPARAMS OutParams;
DWORD dwBytesRead = 0;
BOOL bSuccess = DeviceIoControl(
m_hDriver,
IOCTL_READ_CONFIG_SPACE_DWORD,
&InParams,
sizeof(READ_CONFIG_SPACE_DWORD_INPARAMS),
&OutParams,
sizeof(READ_CONFIG_SPACE_DWORD_OUTPARAMS),
&dwBytesRead,
NULL);
_ASSERTE(bSuccess);
// All ok.
return OutParams.ulData;
|