This project is read-only.

using WinUnit and registration free COM activation

Jun 16, 2011 at 10:10 PM


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:

Jun 16, 2011 at 11:58 PM

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

Jun 17, 2011 at 4:46 AM

I got this to work by following the guide here:

And also example code from vvvsample here:


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: