 |
|
 |
Hu
|
|
|
|
 |
|
 |
but still doesn't work well with office, hope somebody could fix the problems in order to make it work with any kinda ole servers. thanks much.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
 |
|
 |
when i use the testor to open an pdf file, i got the assert error info.
the code :
void COleClientItem::Activate(LONG nVerb, CView* pView, LPMSG lpMsg)
{
ASSERT_VALID(this);
ASSERT(m_lpObject != NULL); // here
.....
}
why ? what should i do to avoid this
thanks
|
|
|
|
 |
|
 |
hi, thanks for question.
please confirm, if IEmbOleObjControl::Open(REFCLSID clsidServer,BSTR bstrPath), the parameters r dilivered correctly, assume that ur first parameter is not right, for that case, Ole object couldn't be created sucessfully, make sure your OLE SERVER does exist in your local machine, and it's clsid is copyed correctly. furthermore my code is not so strong or that will give u friendly information instead of asserting crash!
I will update it later.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
 |
|
 |
sorry, my tester calls IEmbOleObjControl::CEmbOleObjControl::Open and delivered not correct parameters for ur machine, because the ole server which I wanted to creat doesn't exist in my machine, but it doesn't exist in your machine by assumption. u may copy one existing OLE SERVER clsid and dilivered, to see if it runs successfully? thanks for regard.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
 |
|
 |
thanks for your reply.
i will try again
|
|
|
|
 |
|
 |
I try it with the clsid of ms word but found the same error,
the code
void CtesterDlg::OnBnClickedBtnopen()
{
if(!m_pCtrl)
{
AfxMessageBox("please create the control first");
return;
}
CString strInfo;
CWnd *pWnd = GetDlgItem(IDC_EDTPATH);
pWnd->GetWindowText(strInfo);
_bstr_t bstrInfo(strInfo.GetBuffer());
static CLSID const clsid_word ={0x00020906,0x0000,0x0000,{0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x46
}
};
m_pCtrl->Open(clsid_word,bstrInfo);
}
i just change the clsid.
what should i do to run tester
|
|
|
|
 |
|
 |
yes, I confirmed it, it crashes with ms word. to make it work, u may develop ur own ole server program by vc++, i'm sure that could work. I will fix this bug. thanks so much for attention.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
 |
|
 |
I have many resembling ActiveX controls. i need to develop run-time, exportable classes ( for evry control ) such they provide a uniform interface but then relay the application calls to the specific ActiveX operations. ( a sort of encapsulation to allow the independence between those ActiveXs and the application such plugin components and a main one)
So is this a way how do that ?
( i do'nt know much about COM )
Thank you in advance.
charfeddine_ahmed@yahoo.fr
|
|
|
|
 |
|
 |
yes, ours r similar projects. just my project is for embedding OLE ActiveX Server program, but urs, if my understanding is correcty, that is for embedding ActiveX control. To run your activex controls, u need ActiveX control container, to respond ur main program calls as a Plugin, u need realize plugin specific interfaces upon ActiveX control container. Hope my project could give u some clue on ur solution, Good luck.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
 |
|
 |
Can a CWnd object do the job of a container, for I used that, and attached the ActiveX control to it by mean of an MFC proxy class (New Class-->MFC class from ActiveX).But I failed.
|
|
|
|
 |
|
 |
there r some ActiveX control container demos in MSDN, u may search them from it.I think using ATL is simpler.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
 |