ADO/OLE DB数据源对话框

这篇文章实际上就是一段代码。

#include

 hr = CoCreateInstance(
    CLSID_DataLinks,
    NULL,
    CLSCTX_INPROC_SERVER,
    IID_IDataInitialize,
    reinterpret_cast(&pIDataInitialize));

 // Prompt the user to view/edit the connection information.

 IDBPromptInitialize   *pIDBPromptInitialize   = NULL;

 hr = pIDataInitialize ->QueryInterface(
    IID_IDBPromptInitialize,
    reinterpret_cast(&pIDBPromptInitialize));

 IDBProperties *      pIDBProperties   = NULL;
 hr = pIDBPromptInitialize->PromptDataSource(
    NULL,
    NULL,
    DBPROMPTOPTIONS_PROPERTYSHEET,
    0, NULL,
    NULL,
    IID_IDBProperties,
    reinterpret_cast(&pIDBProperties));

你可能感兴趣的:(COM/dotNet,null,server,user)