C# COM Server should be called by a C++ client...
-
Hi all, I'm absolutely no expert with COM but I have a (maybe very easy) question to you. I have a .dll file and would like to call some functions out of that. So I've created now a .tlb file out of the .dll with the command: regasm XYZ.dll /tlb This worked great and now I could also create the .tlh file out of this .tlb If I add this line in my C++ code: #import "XYZ.tlb" named_guids raw_interfaces_only and recompile the project. That all worked great right now. But now I have the problem how I must call this part in my code to use the functions out of this .dll file? I know that it should work with the CoCreateInstance(...) function but I don't know what parameters I must set there exactly? Maybe I could send to someone my little example and he could help me? I thinks this should be no problem for an expert? In this forum it's not possible to add a little attachment :-(. Thanks for any help!!! Regards, Jürgen
-
Hi all, I'm absolutely no expert with COM but I have a (maybe very easy) question to you. I have a .dll file and would like to call some functions out of that. So I've created now a .tlb file out of the .dll with the command: regasm XYZ.dll /tlb This worked great and now I could also create the .tlh file out of this .tlb If I add this line in my C++ code: #import "XYZ.tlb" named_guids raw_interfaces_only and recompile the project. That all worked great right now. But now I have the problem how I must call this part in my code to use the functions out of this .dll file? I know that it should work with the CoCreateInstance(...) function but I don't know what parameters I must set there exactly? Maybe I could send to someone my little example and he could help me? I thinks this should be no problem for an expert? In this forum it's not possible to add a little attachment :-(. Thanks for any help!!! Regards, Jürgen
-
This may help: Introduction to COM - What It Is and How to Use It[^].
Yes, I've read this page and it works also for another project. But this time I have another one and I don't know exactly how I can go on with this one :-(. Could you take a look at the project I have? Just a few minutes. That would be really great!!!