My mistake i forgot to compile the proxy-stub. Thanks
Johan O
Posts
-
Passing Arrays in COM -
Passing Arrays in COMNeed help with passing a BYTE array in COM. I think i have done it right but i only get the first byte passed. Here is the idl: interface ICOMtestObject : IUnknown { [id(1), helpstring("method GetData")] HRESULT GetData([out]ULONG *sz,[out,size_is(,*sz)]BYTE **data); }; Here is the implementation in the COM server: STDMETHODIMP CCOMtestObject::GetData(ULONG *sz, BYTE **data) { // TODO: Add your implementation code here *data = (BYTE*)CoTaskMemAlloc( 5 * sizeof( BYTE)); (*data)[0]='T'; (*data)[1]='e'; (*data)[2]='s'; (*data)[3]='t'; (*data)[4]='\0'; *sz=5; return S_OK; } Here is the implementation in the client: HRESULT hr = m_objPtr.CoCreateInstance(L"Comtest.COMtestObject.1"); ULONG sz;BYTE *data; hr = m_objPtr->GetData(&sz,&data); The data array includes only the first byte. Here are some sample code http://forums.devx.com/attachment.php?attachmentid=1036
-
CWnd::CreateControl copy/paste problemA very big thanks to you Ryan, now it works!
-
CWnd::CreateControl copy/paste problemI'm having a problem with the CreateControl method of the CWnd object. I can create the ActiveX but it seems that the Ctrl-c and Ctrl-v is not forwarded to the Active X but all the general key press works. When i insert the ActiveX in the OLE test container the Ctrl-c and Ctrl-v works fine. Please help me. Thanks