⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_55914.htm

📁 vc
💻 HTM
字号:
<p>
序号:55914 发表者:刮狂风的岁月 发表日期:2003-10-13 22:57:00
<br>主题:各位大侠,请问CWnd的Invokehelper(...)的方法和属性参数在哪里查?多谢!!!
<br>内容:最近看到有人写了一个多媒体程序,功能实现几乎全调用Invokehelper这个函数,只是第一个参数有些不同,在下初学,谢谢指教!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:michael 回复日期:2003-10-14 07:32:57
<br>内容:CWnd::InvokeHelper<BR>void InvokeHelper( DISPID dwDispID, WORD wFlags, VARTYPE vtRet, void* pvRet, const BYTE* pbParamInfo, ... );<BR>throw( COleException );<BR>throw( COleDispatchException );<BR><BR>Parameters<BR><BR>dwDispID<BR><BR>Identifies the method or property to be invoked. This value is usually supplied by Component Gallery.<BR><BR>wFlags<BR><BR>Flags describing the context of the call to IDispatch::Invoke. For possible wFlags values, seeIDispatch::Invoke in the Win32 SDK OLE Programmer's Reference.<BR><BR>vtRet<BR><BR>Specifies the type of the return value. For possible values, see the Remarks section for COleDispatchDriver::InvokeHelper.<BR><BR>pvRet<BR><BR>Address of the variable that will that will receive the property value or return value. It must match the type specified by vtRet.<BR><BR>pbParamInfo<BR><BR>Pointer to a null-terminated string of bytes specifying the types of the parameters following pbParamInfo. For possible values, see the Remarks section for COleDispatchDriver::InvokeHelper.<BR><BR>...<BR><BR>Variable List of parameters, of types specified in pbParamInfo.<BR><BR>Remarks<BR><BR>Call this member function to invoke the OLE control method or property specified by dwDispID, in the context specified by wFlags. The pbParamInfo parameter specifies the types of the parameters passed to the method or property. The variable list of arguments is represented by ... in the syntax declaration.<BR><BR>This function converts the parameters to VARIANTARG values, then invokes the IDispatch::Invoke method on the OLE control. If the call to IDispatch::Invoke fails, this function will throw an exception. If the SCODE (status code) returned by IDispatch::Invoke is DISP_E_EXCEPTION, this function throws a COleException object, otherwise it throws a COleDispatchException.<BR><BR>Note&nbsp;&nbsp; This function should be called only on a CWnd object that represents an OLE control.<BR><BR>摘自《MSDN》<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:sky++ 回复日期:2003-10-14 09:00:36
<br>内容:Invokehelper调用com的自动化接口中的函数,第一个参数代表要调用的接口中的函数
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:刮狂风的岁月 回复日期:2003-10-14 21:55:47
<br>内容:可是我不知道不同的dwDispID各代表什么意思,请问在哪里查阅相关的ActiveX文档?<BR>谢谢指教!!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:刮狂风的岁月 回复日期:2003-10-18 17:28:31
<br>内容:还是请各位高手给予指点吧,难道这种调用方式很少吗?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:刮狂风的岁月 回复日期:2003-10-19 22:52:55
<br>内容:请问怎么才能查到第一个参数代表的实际接口函数,在哪里查呀,急待各位高手指点!!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:michael 回复日期:2003-10-19 23:13:17
<br>内容:&nbsp;&nbsp;&nbsp;&nbsp;dwDispID是所调用的方法名或者是属性名所对应的ID值,这个值就是IDispatch接口GetIDsOfNames所返回的值。如果您根本就不知道IDispatch接口或者根本没接触过COM的话那么,我说什么都没用,建议您去看看COM。想查找函数名建议去翻翻嵌入到窗口里面的控件的帮助文档。<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:刮狂风的岁月 回复日期:2003-10-20 21:19:52
<br>内容:谢谢michael和sky++的指点,我这就去看看。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -