Note that there are some explanatory texts on larger screens.

plurals
  1. POFindConnectionPoint method returning null connection point
    text
    copied!<p>I found this <a href="https://stackoverflow.com/questions/17338655/subscribe-the-c-sharp-event-in-native-c-using-com-interop">POST</a> which near about resembles my code while doing COM Interop Event Handling using <code>IConnectionPoints</code> Interface.<br> Please suggest me if you have any information related to this topic.</p> <p>I know that <code>FindConnectionPoint</code> returns <code>NULL</code> if there is an error in COnnectionPoint with the source interface(EventInterface).</p> <p>I checked my COM object supporting the source interface by QueryInterface method(P.S::HRESULT returns S_OK). </p> <p>What type of error is occurring here?<br> Please refer to the post. I have the same problem. <strong>UPDATE:</strong> My tlh file snapshot>></p> <pre><code>// // Named GUID constants initializations // extern "C" const GUID __declspec(selectany) LIBID_CSharp = {0x4e5098b7,0x4e51,0x45e5,{0xa7,0x05,0xa7,0xe3,0xc5,0x1e,0x2a,0x80}}; extern "C" const GUID __declspec(selectany) CLSID_PropertyChangeEventArgs = {0xe3a5b5e1,0xda28,0x32cf,{0x93,0x9c,0x18,0x6e,0x90,0xe8,0xd1,0x08}}; extern "C" const GUID __declspec(selectany) IID_ISomeInterface = {0x5f4c254f,0xa363,0x4afd,{0xad,0x5d,0x6d,0x52,0x83,0xfa,0x5e,0x59}}; extern "C" const GUID __declspec(selectany) CLSID_Class1 = {0xf08e4034,0x6904,0x49c4,{0xa2,0x89,0x52,0xf2,0x72,0xc9,0xe6,0x58}}; extern "C" const GUID __declspec(selectany) IID__DownloadEventArgs = {0x6df89fd5,0xa7be,0x3699,{0x98,0x57,0xa3,0xe2,0xec,0x69,0xd2,0x60}}; extern "C" const GUID __declspec(selectany) IID_ISomeEventsInterface = {0x1e430900,0xd303,0x490a,{0xa4,0x73,0xca,0x91,0x46,0xc6,0x7e,0x75}}; } // namespace CSharp </code></pre> <p>My cpp file snapshot>></p> <pre><code>IUnknown* pIUnknown ; HRESULT hresult = CoInitialize(NULL); IConnectionPointContainer* pIConnectionPointContainerTemp; IConnectionPoint* pIConnectionPoint; DWORD* cookie=0; CSharp::ISomeInterfacePtr pIsomeInterface(__uuidof(CSharp::Class1)); hresult=CoCreateInstance(__uuidof(CSharp::Class1), NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**)&amp;pIUnknown); hresult=pIsomeInterface-&gt;QueryInterface(IID_IConnectionPointContainer, (void**)&amp;pIConnectionPointContainerTemp); pIConnectionPointContainerTemp-&gt;FindConnectionPoint(CSharp::IID_ISomeEventsInterface ,&amp;pIConnectionPoint);//Added QUICK watch here&gt;&gt;raised error here CXX0017: Error: symbol "ManagedDLL::IID_ISomeEventsInterface " not found </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload