【转帖】windows mobile 常见内部程序调用

说明,链接
1.【天气接口】,打开系统设置,"{MainDir}\Settings.exe"
1.【天气接口】,查看天气详细,"{MainDir}\Plugins\WeatherForecast.exe D 0"
1.【天气接口】,更新天气预报,"{MainDir}\Plugins\wsHelper.exe Single"
1.【天气接口】,打开节日设置,"{MainDir}\Settings.exe Festivals"
2.【公共接口】,切换亮度,"{MainDir}\Plugins\wsControl.exe Brightness"
2.【公共接口】,增加亮度,"{MainDir}\Plugins\wsControl.exe Brightness +"
2.【公共接口】,减小亮度,"{MainDir}\Plugins\wsControl.exe Brightness -"
2.【公共接口】,增加音量,"{MainDir}\Plugins\wsControl.exe Volume +"
2.【公共接口】,减小音量,"{MainDir}\Plugins\wsControl.exe Volume -"
2.【公共接口】,增加电话音量,"{MainDir}\Plugins\wsControl.exe Ringer +"
2.【公共接口】,减小电话音量,"{MainDir}\Plugins\wsControl.exe Ringer -"
2.【公共接口】,拨打电话,"{MainDir}\Plugins\wsControl.exe Talk 18600"
2.【公共接口】,切换蓝牙,"{MainDir}\Plugins\wsControl.exe Bluetooth"
2.【公共接口】,关闭蓝牙,"{MainDir}\Plugins\wsControl.exe Bluetooth Off"
2.【公共接口】,打开蓝牙,"{MainDir}\Plugins\wsControl.exe Bluetooth Connectable"
2.【公共接口】,发现蓝牙,"{MainDir}\Plugins\wsControl.exe Bluetooth Discoverable"
2.【公共接口】,声音模式,"{MainDir}\Plugins\wsControl.exe SND ON"
2.【公共接口】,震动模式,"{MainDir}\Plugins\wsControl.exe SND VIBRATE"
2.【公共接口】,无声模式,"{MainDir}\Plugins\wsControl.exe SND NONE"
2.【公共接口】,重新启动,"{MainDir}\Plugins\wsControl.exe Reboot"
2.【公共接口】,定时关机,"{MainDir}\Plugins\wsControl.exe Power Off"
2.【公共接口】,飞行模式,"{MainDir}\Plugins\wsControl.exe Phone Off"
2.【公共接口】,电话模式,"{MainDir}\Plugins\wsControl.exe Phone On"
2.【公共接口】,切换Wifi,"{MainDir}\Plugins\wsControl.exe Wifi"
2.【公共接口】,关闭Wifi,"{MainDir}\Plugins\wsControl.exe Wifi Off"
2.【公共接口】,打开Wifi,"{MainDir}\Plugins\wsControl.exe Wifi On"
2.【公共接口】,语音报时,"{MainDir}\Plugins\wsClock.exe AppRunAtTime"
2.【公共接口】,查询话费,"{MainDir}\Plugins\wsSIMCard.exe AppRunAtTime"
2.【公共接口】,切换横竖屏,"{MainDir}\Plugins\wsControl.exe Landscape"
2.【公共接口】,批处理,"{MainDir}\Plugins\wsBatch.exe Batch 批处理文件名"
2.【公共接口】,天气地图,"{MainDir}\Plugins\wsImageView.exe 0"
2.【公共接口】,查询农历,"{MainDir}\Plugins\wsCalendar.exe"
3.【常用程序】,设置--密码,"\Windows\ctlpnl.exe cplmain.cpl,1,0"
3.【常用程序】,设置--主人信息,"\Windows\ctlpnl.exe cplmain.cpl,2,0"
3.【常用程序】,设置--电源,"\Windows\ctlpnl.exe cplmain.cpl,3,0"
3.【常用程序】,设置--内存,"\Windows\ctlpnl.exe cplmain.cpl,4,0"
3.【常用程序】,设置--关于,"\Windows\ctlpnl.exe cplmain.cpl,5,0"
3.【常用程序】,设置--背光,"\Windows\ctlpnl.exe cplmain.cpl,6,0"
3.【常用程序】,设置--调整屏幕,"\Windows\ctlpnl.exe cplmain.cpl,7,0"
3.【常用程序】,设置--输入,"\Windows\ctlpnl.exe cplmain.cpl,8,0"
3.【常用程序】,设置--声音和提醒,"\Windows\ctlpnl.exe cplmain.cpl,9,0"
3.【常用程序】,设置--删除程序,"\Windows\ctlpnl.exe cplmain.cpl,10,0"
3.【常用程序】,设置--菜单,"\Windows\ctlpnl.exe cplmain.cpl,11,0"
3.【常用程序】,设置--按键,"\Windows\ctlpnl.exe cplmain.cpl,12,0"
3.【常用程序】,设置--今日,"\Windows\ctlpnl.exe cplmain.cpl,13,0"
3.【常用程序】,设置--无线数据交换,"\Windows\ctlpnl.exe cplmain.cpl,15,0"
3.【常用程序】,设置--时钟,"\Windows\ctlpnl.exe cplmain.cpl,16,0"
3.【常用程序】,设置--配置网络适配器,"\Windows\ctlpnl.exe cplmain.cpl,17,0"
3.【常用程序】,设置--区域设置,"\Windows\ctlpnl.exe cplmain.cpl,18,0"
3.【常用程序】,设置--连接,"\Windows\ctlpnl.exe cplmain.cpl,19,0"
3.【常用程序】,设置--证书管理,"\Windows\ctlpnl.exe cplmain.cpl,22,0"
3.【常用程序】,设置--蓝牙,"\Windows\ctlpnl.exe cplmain.cpl,23,0"
3.【常用程序】,电话,"\Windows\cprog.exe"
3.【常用程序】,短信,"\Windows\tmail.exe -transport "SMS""
3.【常用程序】,新短信,"\Windows\tmail.exe -transport "SMS" -to " ""
3.【常用程序】,联系人,"\Windows\poutlook.exe contacts"
3.【常用程序】,任务,"\Windows\poutlook.exe tasks"
3.【常用程序】,媒体播放器,"\Windows\wmplayer.exe"
3.【常用程序】,资源管理器,"\Windows\fexplore.exe"
3.【常用程序】,时钟,\Windows\clock.exe"
3.【常用程序】,照相机,"\Windows\pimg.exe -camerakey"
3.【常用程序】,照相机,"\Windows\camera.exe"
3.【常用程序】,计算器,"\Windows\calc.exe"
3.【常用程序】,便笺,"\Windows\notes.exe"
3.【常用程序】,通讯管理器,"\Windows\wrlsmgr.exe"
3.【常用程序】,短信,"\Windows\tmail.exe -service "SMS""
3.【常用程序】,彩信,"\Windows\tmail.exe -service "MMS""
3.【常用程序】,电子邮件,"\Windows\tmail.exe -service "ActiveSync""
3.【常用程序】,图片和视频,"\Windows\pimg.exe"
3.【常用程序】,录音,"\Windows\hotvoice.exe"
3.【常用程序】,同步,"\Windows\repllog.exe"


3.【常用程序】,设置--密码,"\Windows\ctlpnl.exe cplmain.cpl,1,0"
3.【常用程序】,设置--主人信息,"\Windows\ctlpnl.exe cplmain.cpl,2,0"
3.【常用程序】,设置--电源,"\Windows\ctlpnl.exe cplmain.cpl,3,0"
3.【常用程序】,设置--内存,"\Windows\ctlpnl.exe cplmain.cpl,4,0"
3.【常用程序】,设置--关于,"\Windows\ctlpnl.exe cplmain.cpl,5,0"
3.【常用程序】,设置--背光,"\Windows\ctlpnl.exe cplmain.cpl,6,0"
3.【常用程序】,设置--调整屏幕,"\Windows\ctlpnl.exe cplmain.cpl,7,0"
3.【常用程序】,设置--输入,"\Windows\ctlpnl.exe cplmain.cpl,8,0"
3.【常用程序】,设置--声音和提醒,"\Windows\ctlpnl.exe cplmain.cpl,9,0"
3.【常用程序】,设置--删除程序,"\Windows\ctlpnl.exe cplmain.cpl,10,0"
3.【常用程序】,设置--菜单,"\Windows\ctlpnl.exe cplmain.cpl,11,0"
3.【常用程序】,设置--按键,"\Windows\ctlpnl.exe cplmain.cpl,12,0"
3.【常用程序】,设置--今日,"\Windows\ctlpnl.exe cplmain.cpl,13,0"
3.【常用程序】,设置--无线数据交换,"\Windows\ctlpnl.exe cplmain.cpl,15,0"
3.【常用程序】,设置--时钟,"\Windows\ctlpnl.exe cplmain.cpl,16,0"
3.【常用程序】,设置--配置网络适配器,"\Windows\ctlpnl.exe cplmain.cpl,17,0"
3.【常用程序】,设置--区域设置,"\Windows\ctlpnl.exe cplmain.cpl,18,0"
3.【常用程序】,设置--连接,"\Windows\ctlpnl.exe cplmain.cpl,19,0"
3.【常用程序】,设置--证书管理,"\Windows\ctlpnl.exe cplmain.cpl,22,0"
3.【常用程序】,设置--蓝牙,"\Windows\ctlpnl.exe cplmain.cpl,23,0"
3.【常用程序】,电话,"\Windows\cprog.exe"
3.【常用程序】,短信,"\Windows\tmail.exe -transport "SMS""
3.【常用程序】,新短信,"\Windows\tmail.exe -transport "SMS" -to " ""
3.【常用程序】,联系人,"\Windows\poutlook.exe contacts"
3.【常用程序】,任务,"\Windows\poutlook.exe tasks"
3.【常用程序】,媒体播放器,"\Windows\wmplayer.exe"
3.【常用程序】,资源管理器,"\Windows\fexplore.exe"
3.【常用程序】,时钟,\Windows\clock.exe"
3.【常用程序】,照相机,"\Windows\pimg.exe -camerakey"
3.【常用程序】,照相机,"\Windows\camera.exe"
3.【常用程序】,计算器,"\Windows\calc.exe"
3.【常用程序】,便笺,"\Windows\notes.exe"
3.【常用程序】,通讯管理器,"\Windows\wrlsmgr.exe"
3.【常用程序】,短信,"\Windows\tmail.exe -service "SMS""
3.【常用程序】,彩信,"\Windows\tmail.exe -service "MMS""
3.【常用程序】,电子邮件,"\Windows\tmail.exe -service "ActiveSync""
3.【常用程序】,图片和视频,"\Windows\pimg.exe"
3.【常用程序】,录音,"\Windows\hotvoice.exe"
3.【常用程序】,同步,"\Windows\repllog.exe"

==============================================

Windows Mobile 背景灯控制

WindowsMobile系统,开放了控制背景灯光的API,通过该API可以实现打开背景灯、关闭背景灯以及使屏幕闪烁等功能。

总体介绍:

开发语言:使用C#语言,在.net compact framework框架下实现。

适用场景:1.当系统长时间运行是,为了节省硬件的电池,可以关闭背景灯,适软件在后台进行运行。2..net compact framework框架下,如果使用WebService进行数据交互,每次调用WebService时,北京灯都会自动打开,为了避免改现象的发生,可 以在进行数据交互前关闭背景灯光,交互结束后再打开背景灯,特别适用于通过线程轮循方式实现PUSH技术。

具体实现

1.封装API中的DevicePowerNotify方法,代码如下

[DllImport("coredll.dll")]
   private static extern int DevicePowerNotify( string device, PowerState deviceState, int deviceFlags );

2.封装PowerState枚举对象

public enum PowerState
   {
    PwrDeviceUnspecified = -1,  
    FullOn = 0,   // Full on
    LowOn = 1,   // Low on
    Standby = 2, // Standby
    Sleep = 3,   // Sleep
    Off = 4,   // Off
    PwrDeviceMaximum = 5
   };

3.封装一个对外的接口

public static void SetBacklight( PowerState pwr )
   {
    DevicePowerNotify( "BKL1:", pwr, 1 );
   }

OK,到此为止,基本上已经完成,下面写一个方法进行测试,方法实现的效果为是基于Windowsmobile的设备闪烁屏幕

int count = 5;//只进行5次闪烁

    while ( count > 0 )
    {
     SetBacklight( PowerState.Off );
     Thread.Sleep( 500 );
     SetBacklight( PowerState.FullOn );
     Thread.Sleep( 500 );
     Application.DoEvents();
     count--;
    }

看到效果了吧?以上代码经过测试。

原文地址:https://www.cnblogs.com/goed/p/2245829.html