在示例中使用的定义和变量
重要
WSD 挑战者功能已弃用,所有与 WSD 挑战者相关的文档将在 2018 年删除。
以下代码显示了本部分代码示例中使用的常量定义和常见变量。
//
// WSD Challenge DLL name (including a forward path separator) and public API names
//
#define WSDCHNGR_DLL_NAME L"\\WSDCHNGR.DLL"
#define WSDCHNR_INITIALIZE "WSDCHNGRInitialize"
#define WSDCHNR_SHUTDOWN "WSDCHNGRShutdown"
#define WSDCHNR_REGISTER_DEVICE_TO_CHALLENGE "WSDCHNGRRegisterDeviceToChallenge"
//
// Function pointer types for public WSD Challenge APIs
//
typedef HRESULT (*PFN_WSDCHNR_INITIALIZE)();
typedef HRESULT (*PFN_WSDCHNR_SHUTDOWN)();
typedef HRESULT (*PFN_WSDCHNR_REGISTER_DEVICE_TO_CHALLENGE)(__in IFunctionInstance *pFunctionInstance);
//
// The instance module of the WSD Challenge DLL (WSDCHNGR.DLL)
//
HMODULE m_hChallengeDll;
//
// Function pointer for public WSD Challenge APIs that are used by this driver
//
PFN_WSDCHNR_REGISTER_DEVICE_TO_CHALLENGE m_pfnRegisterDeviceToChallenge;
PFN_WSDCHNR_INITIALIZE m_pfnInitializeChallenge;
PFN_WSDCHNR_SHUTDOWN m_pfnShutdownChallenge;