Using an ActiveX control

I'm trying to use an Windows CE ActiveX control in a C# Form. The documentation for AXHost states:

You typically do not use the AxHost class directly. You can use theWindows Forms ActiveX Control Importer (Aximp.exe) to generate the wrappers that extend AxHost.

When I run AxHost, I get the following error:

AxImp Error: Did not find a registered ActiveX control in 'c:\wf\WMPCEOCX.dll'.

Is there something else I should be doing?

Thanks

[803 byte] By [Intelligence] at [2008-2-6]
# 1
Hello,

There are, unfortunately, multiple problems with this scenario.

First, CF does not provide an implementation of AxHost, and does not support ActiveX hosting "out of the box".

Second, CF does not support use of AxImp (largely because we do not provide an implementation of AxHost, upon which AxImp relies).

Third, since the control you are attempting to use is not a desktop control, it is not registered on your development desktop, which I believe can lead to problems with AxImp.

The good news is that despite the fact that we do not provide an AxHost implementation, everything you need to host an ActiveX control is provided by CF. Unfortunatley, you will need to write your own implementation of an AxHost, which is relatively complex, and I have no good references or documentation I can point you to at this time.

Jeremy Hance
SDE/T - .NET Compact Framework
GAC | Loader | Interop

This posting is provided "AS IS", with no warranties, and confers no rights.

jhance_MS at 2007-9-8 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...