Marvin Rowe
asked on
Need to link C++ service to C# DLL
Need to access C# DLL from C++ Have looked into Google and this YouTube Site
https://www.youtube.com/watch?v=M4F6Z4-NAos and have set the [assembly: ComVisible(true)] in the called DLL -- Have all related DLL's strongly signed -- Have an interface and called class with a [ComVisible(true)] attribute and have a GUID attribute for the Interface
The C# solution compiles clean and an associated tbl file is created
The #Imports command in C++ seems OK but the simple C++ basic console does not compile because it can not find the file. The directory was copied straight from file employer
#import "CC:\Users\<My Name>\source\repos\<projectName>\<DLL Name>\bin\Debug\<DLL Name>.tlb" raw_interfaces_only
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Andy's initial answer is correct. Adding "#include <tchar.h>" to the module and keeping with single \'s in the directory path also worked.
ASKER
Here is where I am now -- Added #include <tchar.h> to the C++ program and it saw the file
Not done yet but getting further -- May have this issue resolved -- Testing now -- Will get back to you if I need more assistance