c++ - Wrong marshaling -
i developed out-of-proc server , trying marshal input params, fails. .idl file is:
[ uuid(6a4791c0-f69f-4d78-a591-f549c90c0620), object, oleautomation ] interface ibrowserinterraction : iunknown { hresult unlock([in] bstr str, [in] int value); }; [ uuid(4d36f1c6-9ee6-4d9a-b0aa-6b7195cc5666), version(1.0) ] library browserinterractioninterfacelibrary { [ uuid(cdebf15b-f12c-4559-a6ac-81620c5056c4) ] coclass browserinterractioninterface { interface ibrowserinterraction; }; }; my server code:
m_bpfactory = boost::make_shared<browserplugininterractionclassfactory>(m_synchronizer); iunknown* punk; m_bpfactory->queryinterface(__uuidof(iunknown), (void**)&punk); coregisterclassobject(__uuidof(browserinterractioninterface), punk, clsctx_local_server, regcls_multipleuse, &magic); my client code:
std::string data("some value") std::wstring wstr = std::wstring(password.begin(), password.end()); bstr bs = sysallocstringlen(wstr.data(), wstr.size()); ibrowserinterraction* interraction = null; cocreateinstance(__uuidof(browserinterractioninterface), null, clsctx_all, __uuidof(ibrowserinterraction), (void**)&interraction); interraction->unlock(bs, 123); i debugged client call sends right value. server receives this:

i created proxy\stub library, registered regsvr, , included _i.c , _h.h files in client , server code, , everythong fine.
and client after call of unlock functions shows me error:
run-time check failure #0 - value of esp not saved across function call. result of calling function declared 1 calling convention function pointer declared different calling convention.
Comments
Post a Comment