Sign in to follow this  

COM Problem Unmanaged Calling Managed

This topic is 3744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, This is all new to me so please be patient. I have an unmanaged c++ app that needs to call into a c# dll. I have done a HelloWorld app just to get a feel for how this will work. The HelloWorld app works fine, but when I apply the same techniques to the my project it fails. I swapped out the pieces of the HelloWorld with my project until I found that the problem is coming from my C# dll. For some reason the CLSID that's coming from the C# is not correct, and therefore the pointer ends up being NULL. Has anyone seen something like this before? Here's the little bit of code that does all the work: HRESULT hr; hr = CoInitialize(NULL); CLSID clsid_SessionSFTP = __uuidof(SessionSFTP); hr = pISessionSFTPPtr.CreateInstance(clsid_SessionSFTP); hr = S_OK; int testCallInt = pISessionSFTPPtr->getIntTest(); CoUninitialize (); Thanks in advance for any and all assistance. Daniel

Share this post


Link to post
Share on other sites

This topic is 3744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this