Page 1
Page 2
Page 3
Mobile devices are increasingly being
used by companies to distribute enterprise information to their workforce on computers
that have a compact form-factor. Personal Digital Assistants (PDAs) originally
used for contacts and appointments are becoming mobile work centers and information
repositories for knowledge workers on the go. These devices often need to communicate
with corporate databases and applications, but they suffer the same problems of
their mainframe ancestors: slow unreliable connections and being disconnected
for long periods of time. Message queuing is one solution that will allow these
mobile devices to integrate into the enterprise.
The
PocketPC is the first commercially available consumer PDA type device to support
MSMQ. MSMQ is not built directly into the core operating system ROM of a PocketPC,
but it can be installed as part of an application written for PocketPC. Unfortunately,
there is no eVB component for MSMQ that allows a PocketPC Visual Basic developer
the chance to create a compelling MSMQ based application.
I
created a MSMQ COM object for the PocketPC that matches the MSMQ COM interfaces
found on desktop systems. The full source for this object, as well as all sample
code described in this article , can be freely downloaded from http://www.bsquare.com/eBooks/ProgMSMQ.
The source of the COM object is written in C++ and uses the ATL library for Windows
CE. The MSMQ COM object and all of the sample programs can be compiled using the
free Microsoft Windows CE embedded Visual Tools 3.0 environment.
This
article is an excerpt from my electronic PDF book "Programming MSMQ on the
PocketPC" available for purchase at http://www.mightywords.com
(search for "MSMQ"). It shows you how you can create a simple MSMQ application
that will send a text message to a queue on your PocketPC.
Installing
the PocketPC MSMQ Component
Download the zip file from
http://www.bsquare.com/eBooks/ProgMSMQ.
This zip file contains a CAB file for each PocketPC processor. The CAB files contain
all the binaries for MSMQ, the MSMQ COM component, and a HelloWorld sample eVB
project. To install the CAB files, run the instcab.bat file located in
the cab subdirectory. You will need to change the path to the CEAppMgr.exe
and MSMQ.ini files to reflect the location of these files on your computer. CEAppMgr.exe
will install and register MSMQ on your PocketPC. After installing, you will need
to reset your device. Note the location of the Typelib subdirectory. This directory
contains the type library file and MsmqInc.bas file needed for programming your
eMbedded Visual Basic MSMQ application.
Next Page