Pregunta

El intento de Desactivar almacenamiento en caché BSTR:?

SetOaNoCache();

VC ++ compilador construcción de salida

  • 'SetOaNoCache': identifier not found

No desea utilizar:

  • OANOCACHE = 1

Pregunta:

¿Fue útil?

Solución

No se define en un archivo de cabecera, es en OLEAUT32.dll. Se le puede llamar así:

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); } }

Otros consejos

No es. Desde la biblioteca API de Win32 enviado con 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.

El prototipo como se muestra:

inline void TurnOffCache ()
{
// Function prototype.
extern "C" SetOaNoCache(); 
// Turn off BSTR caching.
SetOaNoCache();
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top