Plus: 这个接口的具体作用是什么,什么时候必须用到?
解决方案 »
- VC6.0如何做出MFC界面的车牌识别系统
- 读文件数据显示在编辑框的问题?新手求指点!!!
- MFC工程里将excel9中的内容导入到SQL数据库中,无法正常关闭Excel.exe进程
- 插入U盘后启动我自己的程序
- 用sendmessage送一个什么消息可以让一个对话框里的EDIT控件显示指定的字符?
- 哪位高人用Crystal Report做過財務軟件報表,急呀.
- 请问如何写消息日志的资源文件
- 大家整理一个自已的贴子吧,该结的就结吧,我今天回答了一百多个问题,只有两个仁兄结贴,我等着分救急的
- 怎么去掉字符的空格 就是char *str,有空格就删掉。在线等候,编译通过的马上给分
- opencv怎样进行视频干扰中的雪花检测
- ActiveX控件传递自定义类对象
- 了解SPEEX的来指点下小弟吧
::CoInitialize(NULL); // Create an instance of the Word application and obtain the pointer
// to the application's IDispatch interface.
CLSID clsid;
CLSIDFromProgID(L"Word.Application", &clsid); IUnknown* pUnk;
HRESULT hr = ::CoCreateInstance( clsid, NULL, CLSCTX_SERVER,
IID_IUnknown, (void**) &pUnk);
IDispatch* pDispApp;
hr = pUnk->QueryInterface(IID_IDispatch, (void**)&pDispApp); // Get IDispatch* for the Documents collection object
szFunction = OLESTR("Documents");
hr = pDispApp->GetIDsOfNames (IID_NULL, &szFunction, 1,
LOCALE_USER_DEFAULT, &dispid_Docs);
hr = pDispApp->Invoke (dispid_Docs, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYGET, &dpNoArgs, &vResult,
NULL, NULL);
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
unsigned int cNames,
LCID lcid,
DISPID FAR* rgDispId
);
riid
[in] Reserved for future use; set to IID_NULL.
rgszNames
[in] Passed-in array of names to be mapped.
cNames
[in] Count of the names to be mapped.
lcid
[in] Locale context in which to interpret the names.
rgDispId
[out] Caller-allocated array, each element of which contains an identifier that corresponds to one of the names passed in the rgszNames array. The first element represents the member name. The subsequent elements represent each of the member's parameters.