【发布时间】:2018-02-05 21:10:22
【问题描述】:
你能告诉我这个 c++ 代码有什么问题吗?它总是返回 E_INVALIDARG
typedef HRESULT STDAPICALLTYPE AcquireDeveloperLicense(
_In_opt_ HWND hwndParent,
_Out_ FILETIME *pExpiration
);
HINSTANCE hDll = LoadLibrary(TEXT("WSClient.dll"));
AcquireDeveloperLicense *acquire_license = (AcquireDeveloperLicense*)GetProcAddress(hDll, "AcquireDeveloperLicense");
FILETIME *pExpiration = NULL;
HWND hwnd = GetConsoleWindow();
HRESULT result = acquire_license(hwnd, pExpiration);
【问题讨论】:
-
错误信息告诉你出了什么问题。其中一个论点无效。您是否查看了错误代码并认为它可能暗示什么?
标签: c++ visual-studio winapi