views:

40

answers:

1

Hi,

I am using a self made dll using VC++ in C#.

I wanted to ask, is there any way by which I could monitor the run time performance the dll. Like, once the C# code has made a call to the dll and once when it is loaded, can I monitor the behavior of the dll?

I am in development phase and the dll code-logic when run independently, runs perfect, however, when I call it from C#, it behaves awkwardly. So, wanted to figure out.

Thanks

A: 

Have you tried debugging your DLL by attaching it to the running C# process? Via: Debug->"Attach to Process", or even Debug->"Start Debugging" then calling the c# app.

Or writing a quick C++ app to test the actual DLL (not just the logic), thus eliminating C# as the reason it doesn't work.

ritalinkid18
Hi, thanks for the reply. Can you please also tell me how do I set breakpoints for the dll? As-In, I have set breakpoints, but during execution the breakpoints are not encountered in the dll.
James
It doesn't sound like you are debugging the DLL correctly. Put a breakpoint in the DllMain(..) function to ensure it being loaded. Also, make sure you are building it with optimizations off (as-in, a default debug build ). See:http://msdn.microsoft.com/en-us/library/ms164704%28VS.80%29.aspx#vxtskdebuggingdllprojectswaystodebugthedll
ritalinkid18