Link to home
Start Free TrialLog in
Avatar of Marvin Rowe
Marvin RoweFlag for United States of America

asked on

Accessing C# DLL with I/P parameters on instantiation from a C++ program

Think I have been able to access a C# DLL from a C++ application, however, I want to interface to a C# DLL that has required parameters upon instantiation -- Pretty sure I can get to a C# DLL with a () constructor but would like to have a constructor like 


public ClassName(object param1, object param2, ...)

{

         Property1 = param1;

         Property2 = param2;

         :

}


How do I do just that?  Thanks

Avatar of louisfr
louisfr

C++/CLI or native?
Avatar of Marvin Rowe

ASKER

User generated image
User generated image
2 things:
1) It all depend on what the DLL expose.
2) To my knowledge, without the library, no hope.
What kind of project did you create? "Console App" or "CLR Console App"? Something else?
The C++ application is a windows service running in background on the PC

If it can't be done, it can't be done.  As a backup, I have added a Method that receives the parameters after the object is instantiated.  I know that 2 step process will work but was hoping for a one step process.
ASKER CERTIFIED SOLUTION
Avatar of louisfr
louisfr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial