我正在尝试动态加载
slc.dll
以用于激活 Windows 10 机器,当尝试加载函数 SLActivateProduct
时,它失败并在下面的代码中打印错误,当在 dependency walker 中检查此函数时,它不存在于何处被发现
typedef struct _tagSL_ACTIVATION_INFO_HEADER {
DWORD cbSize;
SL_ACTIVATION_TYPE type;
} SL_ACTIVATION_INFO_HEADER;
typedef GUID SLID;
typedef PVOID HSLC;
typedef HRESULT WINAPI (*SLActivateProductFunc)(HSLC, const SLID *, UINT, const PVOID, const SL_ACTIVATION_INFO_HEADER *, PCWSTR, WORD);
.
.
.
int main(){
.
.
.
SLActivateProductFunc SLActivateProduct;
SLActivateProduct = (SLActivateProductFunc)GetProcAddress(hModule, "SLActivateProduct");
if (!SLActivateProduct)
{
printf("Failed to load SLActivateProduct()\n" reset);
exit(EXIT_FAILURE);
}
}
SLActivateProduct
在哪里,如何从dll中加载它?