views:

20

answers:

0

Hello,

Am facing quite a nagging problem from quite sometime. The entire process is described below and please let me know what I am doing wrong:

I have a VC++ project, say, "MyVC++Project" which references a third party dll named "thirdparty.dll". I am concerned about calling two methods from the dll, namely a.)::Validate(), which validates the set of inputs given to it and then b). ::Run() which runs the dll based on the inputs and gives us a CSV file as output. All this is running perfectly fine in the debug/release build of my standalone application.

However, what I am trying to accomplish is to call the VC++ executable methods from any language, e.g., C#. For this, I have written the necessary entries in the IDL file and placed the compiled exe in my new C# project that I have created. As per my knowledge, I am referencing this dll properly from my C# testcode. Everything works fine until the point when the above mentioned ::Run() function is being called. I can confirm that the dll can be accessed, since the ::Validate() method runs fine, giving us errors if invalid inputs are fed to the application. But, the ::Run() method fails to run properly.

For the sake of simplicity, am outlining the steps I have done:

  1. I compiled "MyVC++Project" which references a third party dll named "thirdparty.dll" in the release mode.

  2. I got "MyVC++Project.exe" as an output.

  3. I created a C# application and added "MyVC++Project.exe" as a reference.

  4. I used the methods in that exe and fed the proper outputs in order for it to call that dll correctly.

  5. I execute the ::Validate() method.

  6. This particular function of the dll works fine and even gives us the errors if it is fed with improper output.

  7. I executed the ::Run() method.

  8. I am not getting the required CSV file as output.

Can somebody throw light on what's the problem with these steps or something that I might have missed out?