範例中使用的定義和變數
重要
WSD Challenger 功能已被取代,而且 2018 年將會移除所有 WSD Challenger 相關檔。
下列程式碼顯示本節程式碼範例中使用的常數定義和一般變數。
//
// 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;