我想在我的节点插件中访问DLL。我像这样配置了binding.gyp:
{
"variables": {
"dll_files": [
"AUDIOPRO.DLL",
"AUDIOSEA.DLL",
"AUDIOSWA.DLL",
]
},
"targets": [
{
"target_name": "addon",
"sources": [
"Main.cpp"
],
"libraries": [
]
}
]
}
我在Main.cpp中尝试过这样:
const char* processAddress = "../AUDIOPRO.DLL";
HMODULE processModule = LoadLibrary(processAddress);
if (processModule == NULL) {
// always enters here
}
问题是processModule
总是为NULL,我不知道为什么......