Question

Tentative de désactiver cache BSTR:

SetOaNoCache();

compilateur VC ++ construire sortie :

  • 'SetOaNoCache': identifier not found

Ne pas à utiliser:

  • OANOCACHE = 1

Question:

Était-ce utile?

La solution

Il est pas défini dans un fichier d'en-tête, il est en OLEAUT32.dll. Vous pouvez l'appeler comme ceci:

typedef int (*SETOANOCACHE)(void);

void DisableBSTRCache() { HINSTANCE hLib = LoadLibrary("OLEAUT32.DLL"); if (hLib != NULL) { SETOANOCACHE SetOaNoCache = (SETOANOCACHE)GetProcAddress(hLib, "SetOaNoCache"); if (SetOaNoCache != NULL) SetOaNoCache(); FreeLibrary(hLib); } }

Autres conseils

Il est pas. A partir de la bibliothèque API Win32 livré avec C ++ Builder:

Requirements

Windows XP: Requires Windows XP Service Pack 2 or later.

Windows 95/98: Not supported.

Header: Not supplied. Declare prototype as shown.

Library: Use oleaut32.lib.

Le prototype comme le montre:

inline void TurnOffCache ()
{
// Function prototype.
extern "C" SetOaNoCache(); 
// Turn off BSTR caching.
SetOaNoCache();
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top