Using a console application, I’m making use of a c++ com dll to call a function.
I have added the registered DLL as a reference for the project and then I am instantiating the object and calling the function. (I should note that I’m not using pinvoke as some other people seem to be)
I should be getting a string back as a result but I am just getting an empty string. The only way I can get any form of output is by enabling debugging for unmanaged code and from that I can see that it is executing correctly and returning a result.
I have had a search around stackoverflow and a few other sites and can’t quite find anything that matches this. Any ideas what I’m doing wrong or how I can get it to return a value?
EDIT: As requested, here is the code –
COMMODCHECKLib.Modcheck mod = new COMMODCHECKLib.Modcheck();
string output = mod.check("123456");
Well it seems that the documentation for the DLL was incorrect and gave the check function as the one I needed but infact there was a function called checkAllocate which is the one I needed to use. Apologies guys – many thanks for your time and efforts