Skip to main content

Past Blast

Featured Products

Windows Mobile Developer Controls
Windows Mobile Developer Controls
Stay in touch using the DEVBUSS RSS feeds.
 

News

Windows Mobile Developer Controls
Windows Mobile Developer Controls

IDSSAPI Part 1 of 3 - A useful set of API wrappers for eVB developers

Written by Robert Levy  [author's bio]  [read 38604 times]
Edited by Derek

Page 1  Page 2  Page 3 

Any seasoned Visual Basic 6 programmer who has picked up a Pocket PC and spent any more than 15 minutes playing with embedded Visual Basic will be quite vocal in pointing out that eVB just doesn't want to do what you want to do. Innovative Decision Support Systems (IDSS) has come to our rescue with IDSSAAPPII, a library of functions guaranteed to solve the most common problems VB6 programmers find when transitioning to eVB.

Among the long list of capabilities that IDSSAPI provides are playing sound files, running other programs, getting and setting the system time, pausing code execution, run other programs, perform a soft reset, enhancing the functionality of list boxes, examining and manipulating memory allocation, accessing battery power statistics, getting and setting registry values, removing screen elements (such as the Start button, SIP menu, and task bar), and responding to hardware keys. For a complete and up to date list of features, you will want to take a look at the IDSSAPI web site [http://www.innovativedss.com/idssapi.asp]. Later in this article we will see how to explore the innards of this library by using the Object Browser Tool.

IDSSAPI is essentially a "wrapper" for the Windows CE Application Programming Interface (API), giving eVB developers access to advanced functionality that could otherwise only be achieved by learning eVC++ or using sophisticated routines and "hacks" to access the WinCE API directly from eVB. The purpose of a "wrapper" (be it IDSSAPI or any other wrapper for any other language) is to provide simplified ways of performing certain tasks that would otherwise be relatively difficult. The inherent problem thus associated with wrappers is that by simplifying a task, they must sacrifice the flexibility that could be achieved by taking the more complex direct approach. IDSSAPI is, by definition, a victim of this law of nature.

One example of this is IDSSAPI's PlaySound method which takes a single parameter: the filename of an sound file to play. This is very straightforward and common sense would dictate that it is sufficient. Meanwhile, the WinCE API's equivalent function is significantly more difficult to use but this is due in part to the added options it provides such as the ability to choose whether or not to play the sound synchronously, asynchronously, looped, etc. [Note that you can see this for yourself by looking at lines #238-243 of the "mmsystem.h" file that comes with Microsoft's Embedded Visual Tools.]

If your needs require advanced functionality and tighter control over the program, directly accessing the WinCE API remains to be the only way to go. If you're looking for a low cost method to perform tasks that would otherwise be involve complex interaction with the WinCE API, then IDSSAPI is an excellent solution which supports the key selling points of VB as a language (simplified coding syntax/style and fast development cycles).

Once you've decided that IDSSAPI is something you want to use and have installed it on your desktop, you will need to create a reference to it in your eVB.

To do this, select "References." from the eVB's "Project" menu. Note that if IDSSAPI does not appear in the list of references to choose from, you will need to click the "Browse." button and manually find the idssapi.tlb file, ignoring the message box saying that IDSSAPI was not designed for your platform. Now, check the box labeled "IDSS Windows CE API Wrapper Function Library" and you're good to go.

Next Page