1

In my VS2012 C# project, I am wiring a code that is using VC6 composed ActiveX EXE through its auto generated assembly equivalent that, I suppose, some plumbing is done with TLBIMP.exe when it is referenced in my C# project.

When the code is executed I see the ActiveX EXE being launched in a separate process and is terminated upon the termination of the C# code that it is referenced from.

It seems working as I expected, but I have hard time looking for documentation from which I can rest assure that it is the correct usage of ActiveX EXE in C# project.

Can anyone give some advice?

hanishi
  • 165
  • 2
  • 11

1 Answers1

2

It is a good sign that you can see the process running. A very easy way to prove success and gain 100% confidence would be to add logging to your VC6 exe and examine the log to ensure it is behaving as you expect. For example, if your VC6 exe receives command line arguments, you could log what they are to ensure you are correctly executing it from your C# program. If you cannot change the VC6 exe, you are left with black box testing: With specific inputs, do you get the expected outputs? I suppose you could use fancier and more time consuming methods, but you might not need to if my suggestions are sufficient.

clairestreb
  • 1,243
  • 12
  • 24
  • I'm assured that this is correct usage of referencing ActiveX.EXE as COM component within from Visual Studio. The only problem that I still see is that the ActiveX.EXE remains even after the process that references it is terminated. Do you have any clue? Why would it remain? – hanishi Mar 04 '14 at 04:47
  • 1
    @hanishi 1) You said "When the code is executed I see the ActiveX EXE being launched in a separate process and is terminated upon the termination of the C# code that it is referenced from." in your question, so your new comment conflicts with that. Which is it? 2) If it is not terminating, I think you should post a new question and show the code you are using to launch the EXE. But, maybe this will help: http://stackoverflow.com/questions/7322024/starting-and-stopping-a-process-in-c-sharp-net – clairestreb Mar 12 '14 at 22:05
  • Thanks for your comment. I noticed that ActiveX EXE process remains if the ActiveX Exe process get hold of C# event handler through its event variable(I have C# event handler attached to ActiveX EXE VB6 event variables) – hanishi Mar 18 '14 at 01:01