调用word的时候,运行到OleRun出错,提示xxxxxxxx内存不能read
在这之前我已经调用SetClientSite和Advise了。
那位能告诉我olerun一般什么时候出这样的错

解决方案 »

  1.   

    olerun可以看看MSDN的介绍:The OleRun function puts an object in the running state. The implementation of OleRun was changed in OLE 2.01 to coincide with the publication of the IRunnableObject interface. You can use OleRun and IRunnableObject::Run interchangeably. OleRun queries the object for a pointer to IRunnableObject. If successful, the function returns the results of calling the IRunnableObject::Run method.
    Note  The implementation of OleRun in earlier versions of OLE differs from that described here.
    For more information on using this function, see IRunnableObject::Run.