BeeMobile for Windows Mobile

    看到Nick介绍用beeMobile4.net Controls,于是上它的主页,打算下载过来使用。主页上简介明了地给出了4个工具,其中ColorPicker, ProgressBar 和OpenSaveDialog这三个是要收费的,当然有试用版可以下载。不过有一个是完全免费的,那就是Free Utils,包括一个封装好的源代码库,还有一个实例工程,今年的愚人节刚刚更新的。下载过来以后发现,这几个源代码工程都是用visual studio 2008建立的,主要包括一些常用的功能,如复位设备,操作背景灯,查找一些应用程序所在的文件夹,查询设备的IMSIIMEI码。如果有朋友打算下载过来试用的话,最好使用相同版本的visual studio

    下载源代码工程包FreeUtils.zip和实例工程01FreeUtilsSample.zip以后,解压到当前目录,编译实例工程,发现编译出错,原因是引用的dll有问题。以下是需要做的一些更改:

1.将源代码工程FreeUtils重新编译,将生成的BeeMobile.Utils.dll重新添加到FreeUtilsSampleCF3工程中。如下图1所示:

1:重新添加对BeeMobile.Utils.dll的引用

2.Form1.cs中,添加对命名空间的使用,如下图2所示:

2:添加对命名空间的使用

3.修改Form1.cs中的PrintSystemDirs函数,代码如下:

       privatevoidPrintSystemDirs()

       {

           Stringpath;

 

           //// FAVORITES

           //path = NativeFileSystem.GetFolderPath(Folders.Favorites);

           //lbSystemDirs.Items.Add(path);

 

           // FONTS

           path =NativeFileSystem.GetFolderPath(CeFolders.FONTS);

           lbSystemDirs.Items.Add(path);

 

           // PERSONAL

           path =NativeFileSystem.GetFolderPath(CeFolders.PERSONAL);

           lbSystemDirs.Items.Add(path);

 

           // PROGRAM_FILES

           path =NativeFileSystem.GetFolderPath(CeFolders.PROGRAM_FILES);

           lbSystemDirs.Items.Add(path);

 

           // PROGRAMS

           path =NativeFileSystem.GetFolderPath(CeFolders.PROGRAMS);

           lbSystemDirs.Items.Add(path);

 

           // STARTMENU

           path =NativeFileSystem.GetFolderPath(CeFolders.STARTMENU);

           lbSystemDirs.Items.Add(path);

 

           // STARTUP

           path =NativeFileSystem.GetFolderPath(CeFolders.STARTUP);

           lbSystemDirs.Items.Add(path);

       }

    在我的WM6设备上运行的效果如下图3所示:

3:程序在WM6设备上的运行效果

    那么,在模拟器上的运行效果如何呢?我试着将目标平台改为pocket pc 2003OK,程序运行没有问题,效果如下图4所示:

4:程序在pocketpc2003模拟器上的运行效果

    大家可以看到,模拟器上的IMSIIMEI就是“12345678901234”和“000”。

    但是,当我把目标平台设置为WM5.0WM6.0的时候,程序均抛出异常,主要是在“BeeMobile.TAPI”命名空间中的“PhoneInfo.Get”出了问题,在以下代码片段中抛出了异常:

// fetch the information with properly size buffer

result = Tapi.lineGetGeneralInfo(hLine2, bytes);

if(result != 0)

{

      thrownewApplicationException(Marshal.GetLastWin32Error().ToString());

}

    从这次试验中发现,模拟器和真实设备的调试,还是存在一些差别的,还得继续找找上面的原因。

 

参考链接:

beeMobile4.net Controls

源代码下载:

FreeUtil.rar

6 Comments so far

  1. Hi everyone. Music is essentially useless, as life is.

    I am from Venezuela and , too, and now am writing in English, please tell me right I wrote the following sentence: "Terbinafine lamisil and itraconazole sporanox are popular oral terbinafine hcl nail solution tns is currently ending phase iii of."



    Thank you very much 8). River.
  2. figure new annual emitted melts organizations small
  3. anthropogenic 2000 http://www.environmental-expert.com http://www.tomw.net.au http://english.peopledaily.com.cn http://blogs.unimelb.edu.au
  4. primary observational home greenhouse technology allowed period
  5. Good evening. Exercise ferments the humors, casts them into their proper channels, throws off redundancies, and helps nature in those secret distributions, without which the body cannot subsist in its vigor, nor the soul act with cheerfulness.

    I am from England and learning to write in English, please tell me right I wrote the following sentence: "There is no problem using such a daily method of flea control."



    Thank you very much :p. Russell.
  6. Erectile dysfunction, <a href="http://www.viagrausaonline.com/">viagra online</a>, 3180, viagra online, ):, http://www.viagrausaonline.com/ Viagra, qbsco.

leave a reply

All fields marked with " * " are required.