问题描述
尝试禁用 BSTR 缓存:
Attempting to disable BSTR caching:
SetOaNoCache();
VC++ 编译器构建输出:
'SetOaNoCache':未找到标识符
不想想使用:
- OANOCACHE=1
问题:
- SetOaNoCache 定义- 头文件?
- Where is SetOaNoCache defined - header file?
推荐答案
它没有在头文件中定义,它在 OLEAUT32.dll 中.你可以这样称呼它:
It is not defined in a header file, it is in OLEAUT32.dll. You can call it like this:
typedef int (*SETOANOCACHE)(void);
void DisableBSTRCache(){HINSTANCE hLib = LoadLibrary("OLEAUT32.DLL");如果(hLib != NULL){SETOANOCACHE SetOaNoCache = (SETOANOCACHE)GetProcAddress(hLib, "SetOaNoCache");如果 (SetOaNoCache != NULL)SetOaNoCache();自由图书馆(hLib);}}
void DisableBSTRCache(){ HINSTANCE hLib = LoadLibrary("OLEAUT32.DLL"); if (hLib != NULL) { SETOANOCACHE SetOaNoCache = (SETOANOCACHE)GetProcAddress(hLib, "SetOaNoCache"); if (SetOaNoCache != NULL) SetOaNoCache(); FreeLibrary(hLib); }}
这篇关于SetOaNoCache 在哪里定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!