Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL into a C# project

Status
Not open for further replies.

Athanasopolous

Programmer
Jun 25, 2005
40
US
How do I simply add a DLL to a project and expose its methods? All I am doing is this so far. I have added the DLL to the Solutions Explorer as a Reference. Then, in the C Sharp file where I make the function call, I list the DLL at the top of the file as one of the "using" types. That seems to be all that is done in the code. What more do I need?

I am also using a manifest file. But I wonder if I have the right code in the manifest file. For example, how do I go about checking the version number of the DLL?

I thought that my problem was how I was declaring a manifest file. But now I think I can safely rule this out.

I think the probem lies in the way I am loading the DLL/COM object that the manifest file references.

The program runs -- sort of. After I embed the manifest file into the executable. I just cannot step through the code in debug mode.

So I put the manifest file into the list of files that the IDE had to reference. And then I noticed a big change. Then the executable that I produced had an error message (that I could ignore and continue running the program, if I choose to) that said the probem was with the way I was loading the COM object.

How do I load a DLL into a GUI front-end written in C#. Where should I look for possible problems?
 
If the DLL was built in Release mode, you will most likely not be able to step through it. Only exception is if there is a .pdb file available for it (obscure option for building in Release).

Otherwise, try and find a Debug build for it.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top