Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AXSample

Windows Mobile 6.5
4/8/2010

This code sample is named AXSample. It demonstrates how to use the Active Template Library (ATL) to create an ActiveX control, and how to access that control in a web page.

  1. Navigate to the solution file (*.sln), and double-click it. By default, the solution file is copied to the following folder:

    C:\Program Files\Windows Mobile 6.5.3 DTK\Samples\Common\CPP\ATL\AXSample

    Microsoft Visual Studio launches and loads the solution.

  2. Build the solution (Ctrl+Shift+B).

  3. Open to the AxSample project properties.

  4. Navigate to Configuration Options > Debugging.

  5. Set the Debugger to Launch to Smart Device Native Debugger.

  6. Set the Remote Executable to \windows\iexplore.exe.

  7. Set the Command Arguments to \Program Files\AxSample\AXSample.htm.

  8. Deploy the solution (F5).

    The sample is copied to the device, and is registered. Internet Explorer Mobile then automatically launches and navigates to axsample.htm.

  1. Load the AxSample.HTML file with Internet Explorer Mobile.

  2. Try clicking the buttons and circles that are displayed.

  1. Click Start > Run.

  2. Type the path-name to SamplePrivDeveloper.pfx certificate, and click OK. By default, this is located in the following folder:

    C:\Program Files\Windows Mobile 6.5.3 DTK\Tools\Security\SDK Development Certificates

  3. Double-click the SamplePrivDeveloper.pfx certificate icon. The Certificate Import Wizard appears.

  4. Click Next. The certificate path-name is filled-in.

  5. Click Next.

  6. Click Next (you do not need a password).

  7. Click Next. Accept the default options; automatically select the certificate store based on certificate type.

  8. 9. Click Finish.

SDK: Windows Mobile Professional SDK and Windows Mobile Standard SDK

Development Environment: Visual Studio 2005 or 2008.

ActiveSync: Version 4.5.

AXSample. demonstrates how to use the ATL to create an ActiveX control, and how to access that control in a web page.

See Windows Mobile Device Security Model for further details on how to install the SDK certificates onto the mobile device, and how to use the privileged SDK certificate to sign this application.

axsample.cpp

Implements functions exported by the .DEF file.

axsample.def

The DLL export definitions.

axsample.idl

The MIDL script file.

axsample.rc

The resource script.

axsamplectl.cpp

Implements the ActiveX entry points, including OnDraw.

stdafx.cpp

Defines the precompiled type information.

axsamplectl.h

Defines the COM interfaces to the ActiveX control.

resource.h

The resource script header file.

stdafx.h.

The precompiled header file.

Community Additions

Show:
© 2014 Microsoft