This project is read-only.

using WinUnit and registration free COM activation

Jun 16, 2011 at 10:10 PM

Hi.

I am trying to create a unit test that instantiates a COM object using registration free (reg-free) activation.

Is this possible without modifying WinUnit.exe or creating WinUnit.exe.manifest for example?

WinUnit 1.2.0909.1

Thank you.

Jun 16, 2011 at 11:52 PM

I found an answer that indicates this is not possible:

http://stackoverflow.com/questions/4935536/nunit-test-with-fortran-dll

Jun 16, 2011 at 11:58 PM

I found another answer that indicates it is possible in one of two ways:

http://stackoverflow.com/questions/1770463/how-to-do-registration-free-com-in-a-plug-in-architecture

Jun 17, 2011 at 4:46 AM

I got this to work by following the guide here:

http://www.mazecomputer.com/sxs/help/sxsapi3.htm

And also example code from vvvsample here:

http://msf.codeplex.com/

 

There is only one caveat: I have to copy the COM dll to the same directory as WinUnit.exe.

I am currently passing the full path of the external manifest and the full path of the test directory to CActCtxHandle.Create() (ex. "C:\MyCppTests\Release\MyCppTests.dll.manifest" and "C:\MyCppTests\Release" respectively).

The COM dll also resides in "C:\MyCppTests\Release" but WinUnit.exe resides in a different directory (ex. "C:\WinUnit").

Any ideas?

Jul 1, 2011 at 8:53 PM

I asked the question on StackOverflow here:

http://stackoverflow.com/questions/6393865/registration-free-com-without-copying-the-dll-to-the-same-directory-as-the-execut