OLE DB API program design

xiaoxiao2021-03-06  64

Before you start, some of you need to know that you don't belong to Ole DB, but you need a function that needs to use.

Coinitialize (); cocreateInstance (); Create a single, uninitial class object specified by CLSID. STDAPI CoCreateInstance (REECLSID rclsid, // Class identifier (CLSID) of the object LPUNKNOWN pUnkOuter, // Pointer to controlling IUnknow DWORD dwClsContext, // Context for running executable code REFIID riid, // Reference to the identifier of the interface LPVOID * ppv // Address of output variable truth receive

Refclsid Rclsid, REFIID RIID, two IDs specify components and their interfaces.

DWORD DWCLSCONTEXT = CLSCTX_INPROC_SERVER,

IDBPromptInitialize * pIDBPromptInitialize; hr = CoCreateInstance (CLSID_DataLinks, NULL, CLSCTX_INPROC_SERVER, IID_IDBPromptInitialize, (void **) & pIDBPromptInitialize); CoGetMalloc (); CoUninitialize ();

Contains header files: #include #include #include #include

#include "jetoledb.h" #include "msjetoledb.h"

转载请注明原文地址:https://www.9cbs.com/read-106803.html

New Post(0)