ActiveX Test Container Application is Still Available

ActiveX Test Container Application is Still Available

Rate This
  • Comments 6

Hello, I’m Pat Brenner, a developer on the Visual C++ Libraries team.  I’ve noticed some posts on various forums lamenting the loss of the ActiveX Test Container application and I wanted to address those concerns.

The ActiveX Text Container tool is still available as a sample in Visual Studio 2008 and Visual Studio 2010.  It is included in the Visual C++ samples ZIP file included with Visual Studio:

·         For VS2008, it’s in [Program Files]\Microsoft Visual Studio 9.0\Samples\1033\

·         For VS2010, it’s in [Program Files]\Microsoft Visual Studio 10.0\Samples\1033\

The sample is named TSTCON and is in the C++\MFC\OLE\TstCon folder in the ZIP file.  You can build this sample and run it to test the functionality of your ActiveX controls.

Note that there is a problem with the sample in Visual Studio 2008.  After building the application, running it will give an error message because “the application configuration is incorrect”.  To fix this, change the “Enable User Account Control” property on the Linker / Manifest File property page for the TCProps project to No (as in the screen shot below) and rebuild the solution.  You will need to do this for all configurations and platforms that you want to run.  Once you do so, the tool will run (in both Win32 and x64 configurations) without issue.

For Visual Studio 2010, the sample was converted to the new Visual C++ build system (based on MSBuild) and the problematic setting was removed during the conversion.  So for Visual Studio 2010, the sample builds and runs (in both Win32 and x64 configurations) without issue.

This tool was removed from the set of tools shipped with Visual Studio 2008 for a couple of reasons:

·         The code base is fairly old, and had not been maintained on a consistent basis, so there were some bugs in the tool but no resources available to fix them.

·         The perception was that the tool was no longer widely used by our customers, so shipping it as a sample was thought to be sufficient.

More information about the sample can be found here.

I hope you find this information helpful.  Feel free to ask any questions you have and I’ll do my best to answer them.

Pat Brenner

Visual C++ Libraries Development

  • I'm sorry to sound snarky, but isn't the purpose of these samples to show how to write *correct* code? And yet you ship ones that don't actually work?

    What exactly is the point of the samples then? I would have thought most developers perfectly capable of writing nonfunctional code without studying the samples shipped with their IDE.

  • Well, to counter the snark: thanks for the explanation. A realistic developer knows how

    to use and improve upon sample code.

    Note well that it's the DLL project, TCProps,

    as you mentioned, not the application project

    TestCon, as I at first edited, that needs the

    adjustment. Until I realized my mistake, I was

    seeing a side-by-side error at startup.

  • "[Program Files]\Microsoft Visual Studio 9.0\Samples\1033\". 1033 depending on your os and vs language...

  • @Patrick:

    Right, the LCID for the location may vary.  Thanks for mentioning that.

    Pat Brenner

    Visual C++ Libraries Development

  • @grumpy:

    I'm not entirely familiar with the set of issues in the test container.  But I imagine part of the problem may be that it can host any ActiveX control, and exercise it fully.  So if you have a malicious ActiveX control on your computer and exercise it using the container, you may encounter security issues.  Certainly we don't have the resources to make the test container as bullet-proof as Internet Explorer has to be regarding ActiveX controls.

    As far as I know the test container is "functional", but I do not know how well it sandboxes the ActiveX control that it is testing.

    Pat Brenner

    Visual C++ Libraries Development

  • hello,Pat Brenner,

    This tool(TSTCON.exe) was removed from the set of tools shipped with Visual Studio 2008 for 2 reasons. you have mentioned above.

    I have other perceptions which i am not very sure, as you are the MS development team member, could you shine some light on it?

    1  i feel that when to test an OCX, the old common way maybe need to change from TSTCON.exe to a new method, this is a hint from  microsoft. am i right or not?

    2 what is the best way that microsoft suggest us to do when to test ActiveX program?

    3  some body suggest to use IE, but IE don't have so many functions to test, it just works but not so useful. how do you think of this?

    4 maybe microsoft think that native C++ to make AcriveX is not a good direction? do you also think that such OCX is discouraging to use now by microsoft? then what is the alternative direction?

    5 some times i just want to do a little test, must i write a test program for any OCX at any time?

Page 1 of 1 (6 items)