分类目录
文章索引模板
Wpf模拟时钟代码实现analogicclock - 九月 5, 2009 by yippee

WPF画个时钟真是方便,可是我碰到得问题是,我得用代码实现。这下可真是够麻烦。
得把XAML的代码一行行用C#写。
然后把DATABIND改为定时器··
还没搞清楚DATABIND机制···
搞了半天终于OK了。

制作简单的WPF时钟 – 大可山博客[GDI+,WPF, .Net图形图像] – CSDN博客
http://blog.csdn.net/johnsuna/archive/2007/10/26/1845605.aspx



3D Digital Clock for WPF – Home
http://solnick.codeplex.com/



CodeProject: Creating a look-less custom control in WPF. Free source code and programming help
http://www.codeproject.com/KB/WPF/WPFCustomControl.aspx



CodeProject: A WPF Digital Clock. Free source code and programming help
http://www.codeproject.com/KB/WPF/digitalclock.aspx



WPF: A ControlTemplate for an Analog Clock | Sahil Malik – blah.winsmarts.com
http://blah.winsmarts.com/2007-3-WPF__A_ControlTemplate_for_an_Analog_Clock.aspx



The Joy Of Programming: Simple WPF Clock using Microsoft Expression Blend
http://proxycrowd.com/browse.php?b=5&u=Oi8vam9iaWpveS5ibG9nc3BvdC5jb20vMjAwNy8wMy9zaW1wbGUtd3BmLWNsb2NrLXVzaW5nLW1pY3Jvc29mdC5odG1s



Implementing an analogic clock in WPF – Orlando Perri
http://blogs.windowsclient.net/orlando_perri/archive/2009/07/29/implementing-an-analogic-clock-in-wpf.aspx



Aaltra blog – Create analog clock in WPF
http://blog.aaltra.eu/en/tech/createanalogclockinwpf



3D Digital Clock for WPF – Home
http://solnick.codeplex.com/



CodeProject: Analog Clock in WPF. Free source code and programming help
http://www.codeproject.com/KB/WPF/WpfClock.aspx



Analog Clock Widget
http://www.c-sharpcorner.com/UploadFile/dpatra/105202009092936AM/1.aspx



Tutorial: Create a Win32 Application Hosting WPF Content
http://msdn.microsoft.com/en-us/library/aa970266.aspx



Analog Clock – C# version
http://geekswithblogs.net/rebelgeekz/archive/2004/02/12/2078.aspx



WPF 2D Transformations — CodeGuru.com
http://www.codeguru.com/csharp/csharp/cs_misc/userinterface/article.php/c12221


 


http://www.galasoft.ch/mydotnet/articles/resources/article-2006102701/Page1.xaml.cs.txt



WPF自定义控件 —— 复合控件(中国象棋联机版) – 咖喱块 – 博客园
http://www.cnblogs.com/Curry/archive/2009/05/06/1450383.html



WPF自定义控件 —— 复合控件(中国象棋联机版) – 咖喱块 – 博客园
http://www.cnblogs.com/Curry/archive/2009/05/06/1450383.html



21.2.2 使用代码创建动画(1) – 51CTO.COM
http://book.51cto.com/art/200908/145521.htm



WPF 深入研究 之 Control 控件 – 包建强的开源地带 – 博客园
http://www.cnblogs.com/Jax/archive/2009/02/11/1194218.html



WPF學習日誌 ~2008年3月號~ – 精華區 – VB2005討論板 – VB研究小站討論區 – Powered by Discuz!
http://www.ncis.com.tw/ncis_bbs/viewthread.php?tid=1457



SerialSeb: WPF Tips’n'Tricks #8: Use your code-behind for binding
http://ih8filters.com/browse.php?b=5&u=Oi8vc2VyaWFsc2ViLmJsb2dzcG90LmNvbS8yMDA3LzEwL3dwZi10aXBzLTgtdXNlLXlvdXItY29kZS1iZWhpbmQtZm9yLmh0bWw%3D



July 2009 – Posts – Orlando Perri
http://blogs.windowsclient.net/orlando_perri/archive/2009/07.aspx



WiredPrairie: Coding Archives
http://www.wiredprairie.us/journal/coding/



Spinning Progress Control in WPF
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/0875ebf8-bb77-45ea-a929-d40743a3bf03/



WPF: Synchronizing animations (part 1: Using built-in features)
http://www.galasoft.ch/mydotnet/articles/article-2007060701.aspx



 

标签:, , ,
20080222 c# post 模拟 接收 php - 十一月 23, 2008 by yippee

20080222 c# post 模拟 接收 php
http://www.yippeesoft.com

Windows端应用程序
 
  1,首先建立两个POST变量,这两个POST变量模拟ASP中的Form的name~~~(我瞎试的,果然是模拟form)
 
 
  System.Net.WebClient WebClientObj=new System.Net.WebClient();
  System.Collections.Specialized.NameValueCollection PostVars=new System.Collections.Specialized.NameValueCollection();
  PostVars.Add("c",textBox2.Text);
  PostVars.Add("b",textBox3.Text);
  //textBox2.Text里面存的是要POST的信息哈
 
 
 
  2,然后传送给一个网页:http://www.dc9.cn/t/default.aspx
 
  try
  &leftsign;
  byte[] byRemoteInfo=WebClientObj.UploadValues("http://www.dc9.cn/t/default.aspx","POST",PostVars);
  //下面都没用啦,就上面一句话就可以了
  string sRemoteInfo=System.Text.Encoding.Default.GetString(byRemoteInfo);
  //这是获取返回信息
  textBox1.Text=sRemoteInfo;
  axDHTMLEdit1.DocumentHTML=sRemoteInfo;
  //下面用了COM组件WebBrowser,让他显示返回信息,没什么用,可以不看。
  object url="about:blank";
  object nothing=System.Reflection.Missing.Value;
  this.axWebBrowser1.Navigate2(ref url,ref nothing,ref nothing,ref nothing,ref nothing);
  ((mshtml.IHTMLDocument2)this.axWebBrowser1.Document).write(sRemoteInfo);
  &rightsign;
  catch
  &leftsign;&rightsign;
 
 
  WEB端应用程序
 
  1,在Page_Load里写
 
  string MyText=System.Web.HttpContext.Current.Request.Form["c"];
  string MyText2=System.Web.HttpContext.Current.Request.Form["b"];
  //获取两个POST来的信息
  StreamWriter sw=new StreamWriter(Server.MapPath(".")+"\\\\1.shtml", true, Encoding.UTF8);
  sw.Write(MyText);
  sw.Write(MyText2);
  sw.Close();
  //true的意思就是以append的方式写入POST来的信息

function   httppost($sURL,$aPostVars,$nMaxReturn=0)&leftsign; 
  //set_time_limit(100); 
  $url   =   parse_url($sURL); 
  
  if   (!$url)   return   ""; 
  if   (!isset($url[\'port\']))     $url[\'port\']   =   80; 
  if   (!isset($url[\'query\']))   $url[\'query\']   =   ""; 
  
  $fp   =   fsockopen($url[\'host\'],   80); 
  
  if   (!$fp)&leftsign; 
  return   ""; 
  fclose($fp); 
  exit; 
  &rightsign; 
  
  $postctt=""; 
  if(is_array($aPostVars))&leftsign; 
  foreach($aPostVars   as   $k=>$v)&leftsign; 
  if($postctt!="")   $postctt.="&"; 
  $postctt.=($k."=".urlencode($v)); 
  &rightsign; 
  &rightsign; 
  $request     =   "POST   ".$url[\'path\']."?".$url[\'query\']."   HTTP/1.1\\r\\n"; 
  $request   .=   "Host:   ".$url[\'host\']."\\r\\n"; 
  $request   .=   "Content-Type:   application/x-www-form-urlencoded\\r\\n"; 
  $request   .=   "User-Agent:   roastduck   Http/1.1\\r\\n"; 
  $request   .=   "Accept-Language:   zh-cn\\r\\n"; 
  $request   .=   "Content-length:   ".strlen($postctt)."\\r\\n"; 
  $request   .=   "Connection:   Keep-Alive\\r\\n\\r\\n"; 
  
  $request   .=   $postctt; 
  fputs($fp,   $request); 
  $tmp=""; 
  $i=0; 
  while   (!feof   ($fp))&leftsign; 
  $tmp.=   fgetc($fp);   
        $i++; 
        if($i>$nMaxReturn   &&   $nMaxReturn>0)   break; 
  &rightsign;   
  fclose($fp); 
  return   $tmp; 
  &rightsign;  

  for(int i = 0;i<Request.Params.Count;i++) Response.Write("<li>" + Request.Params.Keys[i].ToString() + " = " + Request.Params[i].ToString()); Response.Write("<hr>"); for(int i = 0;i<Request.Form.Count;i++) Response.Write("<li>" + Request.Form.Keys[i].ToString() + " = " + Request.Form[i].ToString()); Response.Write("<hr>"); for(int i = 0;i<Request.QueryString.Count;i++) Response.Write("<li>" + Request.QueryString.Keys[i].ToString() + " = " + Request.QueryString[i].ToString()); Response.Write("<hr>"); for(int i = 0;i<Request.Cookies.Count;i++) Response.Write("<li>" + Request.Cookies.Keys[i].ToString() + " = " + Request.Cookies[i].ToString());

  接收post过来的东西
Stream resStream = Request.InputStream;
   //根据上面定义的数据流,以默认编码的方式定义一个读数据流
   StreamReader sr = new StreamReader(resStream, System.Text.Encoding.Default);
   Response.Write(sr.ReadToEnd());

   this.Request.QueryString["ID"].ToString();//获取查询字符串的值

this.Request.Form["ID"].ToString();//获取Post的值

request("xxx").tostring  

 string StrFileName="c:\\\\1.txt";
   System.IO.FileStream fs = new System.IO.FileStream(StrFileName,System.IO.FileMode.Create);
   System.IO.Stream ns=Request.InputStream;
   byte[] nbytes = new byte[512];
   int nReadSize=0;
   nReadSize=ns.Read(nbytes,0,512);
   while( nReadSize >0)
   &leftsign;
    fs.Write(nbytes,0,nReadSize);
    nReadSize=ns.Read(nbytes,0,512);
   &rightsign;
   fs.Close();
   ns.Close();

[php]
<?php
$fp = fopen("php://input",\’r\’);
$post = \’\';
while (!feof($fp)) &leftsign;
   $post .= fgets($fp, 4096);
&rightsign;
fclose ($fp);
echo $post;
?>
[/php]
写了一个试验接收POST的文件
[php]
<?php
$fp = fopen("php://input",\’r\’);
$post = \’\';
while (!feof($fp)) &leftsign;
   $post .= fgets($fp, 4096);
&rightsign;
fclose ($fp);

//echo $post;
/*
$headers = getallheaders();
while (list($header, $value) = each($headers)) &leftsign;
  $aaa = "$header: $value<br>\\n";
  $header .= $aaa;
&rightsign;

$content = $post."@@@@@".$header;
*/

$filename = \’test.txt\’;

if (is_writable($filename)) &leftsign;
    if (!$handle = fopen($filename, \’a\’)) &leftsign;
         print "不能打开文件 $filename";
         exit;
    &rightsign;
    if (!fwrite($handle, $post)) &leftsign;
        print "不能写入到文件 $filename";
        exit;
    &rightsign;
    print "成功地将 $post 写入到文件 $filename";

    fclose($handle);

&rightsign; else &leftsign;
    print "文件 $filename 不可写";
&rightsign;

?>
[/php]

<SCRIPT LANGUAGE="JavaScript">
<!–
var ajax=new Ajax();
str="a=<root><name>10000</name><sex>select * from words where</sex></root>&b=c";
arg=obj(str);
var done=function(o)&leftsign;alert(err(o));&rightsign;;
var load=function()&leftsign;&rightsign;;
ajax.open("getobj.php","POST",done,load,str);
//–>
</SCRIPT>

php端
<? header("content-Type: text/html; charset=utf-8");?>
<?
$dom = new DomDocument;
$dom->loadXML($_POST[\'a\']);
$company = $dom->getElementsByTagName(\’sex\’)->item(0)->nodeValue;
print $company;
print_r($_POST);
?>

<?php
$strName = "fs2you_f_name";
$strLink = "fs2you_f_link";
$strResult = "fs2you_f_result";
$strDescription = "fs2you_f_description";

if (isset($_POST[$strResult])) &leftsign;
    $RAW_POST = file_get_contents("php://input");
    $RAW_POST = str_replace("=", "[]=", $RAW_POST);
    parse_str($RAW_POST, $my_post);

    for ( $i=0;$i<count($my_post[$strResult]);$i++) &leftsign;
     echo "<p>\\n文件名:".$my_post[$strName][$i]."<br />\\n"
      ."描述:".$my_post[$strDescription][$i]."<br />\\n"
      ."上传状态:".$my_post[$strResult][$i]."<br />\\n"
      ."链接:".$my_post[$strLink][$i]."<br />\\n</p>\\n";
    &rightsign;
&rightsign;

?>

编码
public string EncodeBase64(string code_type,string code)
  &leftsign;
   string encode = "";
   byte[] bytes = Encoding.GetEncoding(code_type).GetBytes(code);
   try
   &leftsign;
    encode = Convert.ToBase64String(bytes);
   &rightsign;
   catch
   &leftsign;
    encode = code;
   &rightsign;
   return encode;
  &rightsign;
解码
public string DecodeBase64(string code_type,string code)
  &leftsign;
   string decode = "";
   byte[] bytes = Convert.FromBase64String(code);
   try
   &leftsign;
    decode = Encoding.GetEncoding(code_type).GetString(bytes);
   &rightsign;
   catch
   &leftsign;
    decode = code;
   &rightsign;
   return decode;
  &rightsign;

标签:, , ,

20070811 vs2005 vs2003 smartphone 模拟器 activesync - 一月 12, 2008 by yippee

20070811 vs2005 vs2003 smartphone 模拟器 activesync
http://www.yippeesoft.com

安装 VS2003 VS2005 ACTIVESYNC4.5 ,使用VS2005的模拟器用ACTIVESYNC连接,然后VS2003直接部署到设备调试

下载:
Device Emulator 2.0 Preview
http://www.microsoft.com/downloads/details.aspx?FamilyId=13F5DE85-30CD-4506-9C5B-A2068FA1EE9E&displaylang=en

运行register.bat
这样ACTIVESYNC会增加一个DMA连接

运行VS2005的设备仿真器管理器,CONNECT模拟器,cradle,这时候ACTIVESYNC将检测到设备连接

VS2003开始调试运行即可

当然,前提是内存够大,不然我也不敢这么运行了

资料:
Microsoft Device Emulator 2.0 Beta – Community Technology Preview
Brief Description
This is an updated release of the Device Emulator for ARM CPUs that first released with Visual Studio 2005.
This is the Beta version of Microsoft Device Emulator 2.0. The RTM version of this emulator will be released with the upcoming Windows CE 6.0 release. This Emulator has the same executables and DLLs as the 1.0 emulator that came with Visual Studio 2005 RTM and has upgraded performance and some new features. This install does not replace the emulator installed with Visual Studio 2005. The installer that comes with this preview only copies the relevant binaries to the user\’s system.

VS无法调试智能设备程序的解决方案
Posted on 2005-09-14 13:59 清雷 阅读(156) 评论(0)  编辑 收藏 引用 网摘 所属分类: Mobile Development
     近来在做Windows CE.NET应用程序开发时,虽然可以通过Microsoft ActiveSync连接到智能设备,但是,通过VS调试智能设备程序时,老是报:没有建立可靠的物理连接,必须手动拷贝到智能设备机器上,通过 MessageBox.show()来调试,问题出在哪呢?查阅一下MSDN,总结一下经验,可以通过以下这几个方案来解决:
    1.将%Microsoft Visual Studio .NET 2003%\\CompactFrameworkSDK\\WinCE Utilities\\ToolHelp\\WinCE4相应CPU文件夹下的toolhelp.dll拷贝到智能设备的Windows目录下,重新启动智能设备;
    2.执行%Microsoft Visual Studio .NET 2003%\\CompactFrameworkSDK\\WinCE Utilities\\WinCE Proxy Ports Reg下的ProxyPorts.reg和WinCEx86Device.reg添加进注册表;
    3.执行%Microsoft Visual Studio .NET 2003%\\CompactFrameworkSDK\\WinCE Utilities\\DelDesktopCryptKey下的DelDesktopCryptKey.exe程序;
    4.在VS中,选择"工具"-"Select Windows CE Device CPU",在"Select Windows CE CPU"对话框中选中相应智能设备的CPU类型,然后"确定"后重新启动VS.
   上述几个解决办法并不要每个都执行,如果这四个方法都不行的法,那就只能重新安装Microsoft ActiveSync拉!

一个空程序也是不行,在Visual studio 2005上调试smartphone2003还是不行,查了一下资料,有人提出如下解决方法:
(1)原来是由于security key container过期了,安装Windows CE Utilities for Visual Studio .NET 2003 Add-on package 后,在命令行中到Program Files\\Microsoft Visual Studio .NET 2003\\CompactFrameworkSDK\\WinCE Utilities\\DelDesktopCryptKey目录下运行DelDesktopCryptKey.exe,然后在重启一下计算机,问题解决。
(2)导入Program Files\\Microsoft Visual Studio .NET 2003\\CompactFrameworkSDK\\WinCE Utilities\\WinCE Proxy Ports Reg下的注册表项。

但我的实际情况是,上述两种方法还是不行,难道是Windows Mobile 5.0的手机不能调试smartphone 2003的程序???请各位解答一下

感觉很奇怪,我明明用activesync是可以连上的。到msdn上搜了一下(http://support.microsoft.com/default.aspx?scid=kb;en-us;816826
原文如下:
certain users on the desktop computer may notice that the deployment to a pocket pc device that is connected with activesync is not successful and you receive the following error message:
could not establish a connection with the device. please make sure the device is connected and working properly.
other users on the same computer may be able to deploy and to debug by using the same device, may find that activesync is working correctly, and may find that the file \\windows\\conmanclient.exe is not copied to the device when they try to deploy or to debug. these symptoms indicate a possible corrupted security key container.

on the computer that is running visual studio .net, run the deldesktopcryptkey.exe utility from the command prompt to clean the security key container for the current user. deldesktopcryptkey.exe is installed with the windows ce utilities for visual studio .net 2003 add-on pack. by default, deldesktopcryptkey.exe is located in the program files\\microsoft visual studio .net 2003\\compactframeworksdk\\wince utilities\\deldesktopcryptkey folder.

原来是由于security key container过期了,安装windows ce utilities for visual studio .net 2003 add-on package 后,在命令行中到program files\\microsoft visual studio .net 2003\\compactframeworksdk\\wince utilities\\deldesktopcryptkey目录下运行deldesktopcryptkey.exe,然后在重启一下计算机,问题解决。

A.安装开发工具

安装准备:先安装Mobile Application Development Toolkit,并仔细阅读其中的内容

1.Microsoft ActiveSync 4.1 – Worldwide English

2.Visual Studio.NET 2003

3.SDK for Windows Mobile 2003-based Smartphones

4.Emulator Images for Windows Mobile 2003 Second Edition-based Smartphone

5. Chinese Simplified Emulation Images.msi

6.Windows CE .NET Utilities v1.1 for Visual Studio .NET 2003

7.Windows Mobile Developer Power Toys

其他工具

Windows Mobile 5.0 SDK for Smartphone

Developer Resources for Windows Mobile 2003 Second Edition

eMbedded Visual C++ 4.0

Note: Use the following CD key when installing this software: TRT7H-KD36T-FRH8D-6QH8P-VFJHQ
eMbedded Visual C++ 4.0 SP4

B.部署失败的解决办法

 用.net 2003开发SmartPhone时,在部署的时候会出现如下的错误:

错误: 无法建立连接。请确保此设备已经与开发计算机建立了物理连接。
———————- 完成 ———————

    生成: 1 已成功, 0 已失败, 0 已跳过
    部署: 0 已成功, 1 已失败, 0 已跳过

解决办法:安装Windows CE .NET Utilities v1.1 for Visual Studio .NET 2003后,到Program Files\\Microsoft Visual Studio .NET 2003\\CompactFrameworkSDK\\WinCE Utilities\\DelDesktopCryptKey目录下运行DelDesktopCryptKey.exe,清除当前用户的security key,问题可以解决。

VS.NET Compact Framework Deployment Issues

I have a problem with deploying .NET CF Framework applications from Visual Studio .NET.  I seek your advice…

I try to deploy to a device and get this error in VS.NET 2003:

"Cannot establish a connection. Be sure the device is physically connected to the development computer."

Apparently, what I did was upgrade to Activesync 3.7.1 AFTER having installed Visual Studio .NET 2003.  Now, according to various sources (see Troubleshooting in this link), you need to uninstall and reinstall Visual Studio .NET (or at least uninstall Smart Device support and reinstall it).  I have done both, and as of yet, to no avail.

I have also copied the ProxyPorts section from a machine that does work.

Before I format my machine, anyone have any thoughts on what I might need to do to get this working?  I really do not want to waste the time reinstalling everything.

UPDATE: Fixed it! After a few more installs/uninstalls, I found this link to the Windows CE Utilities Add-on pack 1.1, and running DelDesktopCryptoKey.exe fixed me all up…

症状
当您删除并重新安装 ActiveSync 3.5, 无法部署智能设备应用程序向设备是通过 USB 连接具有安装, Visual Studio NET 2003 计算机上。 您可能收到以下错误消息:
部署到 Pocket PC 设备使用 TCP 连接传输错误: 无法建立连接。 确保设备是物理连接到开发计算机。

回到顶端
原因
当您安装 VisualStudio.NET, 安装将用于 ActiveSync 与代理端口相关的注册表项。 这些代理端口注册表项通知 ActiveSync 将转发所有 localhost、 代理端口特定 TCP 数据到设备。 当您删除或重新安装 ActiveSync, 这些注册表项损坏。

回到顶端
解决方案
警告 如果正确修改注册表通过注册表编辑器或通过其他方法可能发生 Serious 问题。 这些问题可能需要重新安装操作系统。 Microsoft 不能保证能够解决这些问题而。 修改注册表需要您自担风险。

要解决此问题, 必须恢复代理端口注册表项。 要恢复这些注册表项, 使用下列方法之一:
• 重新安装 VisualStudio.NET。 要这样做, 请按照下列步骤操作:
1. 删除并重新安装 Visual Studio NET 2003。
2. 重新启动计算机。
有关如何删除以及如何安装 VisualStudio.NET, 请单击下列文章编号以查看 Microsoft 知识库中相应:
312779 (http://support.microsoft.com/kb/312779/) 可视 Studio NET 2002 自述 1 (部分)
• 导出, 然后导入代理端口注册表项。 要这样做, 请按照下列步骤操作:
1. 没有问题, 计算机上找到以下注册表子项:
\\\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows CE Services\\ProxyPorts
2. 右击 ProxyPorts , 然后单击 导出 。
3. 作为 Proxyport.reg 保存注册表文件。
4. 将 Proxyport.reg 文件复制到计算机有问题。
5. 双击 Proxyport.reg , 然后单击 是 注册表编辑器 对话框中。 这将代理端口注册表项写入注册表。
6. 重新启动计算机。

http://download.microsoft.com/download/c/d/b/cdbff573-73fb-4f9f-a464-c5adc890e1ae/Readme.htm

 开发基于.NET Compact Framework的程序时, 常遇到的问题(2) – 为什么在Visual Studio 2003调试程序时不能通过ActiveSync连接PDA
这个问题困扰了我好久了, 以前也遇到过这个问题, 找了很多网上的资料, 无非就是重装Visual Studio 2003, 这也太……, 哎, 不说了, 真不知道微软搞的这个什么玩意儿, 要知道重装个Visual Studio 2003, 没有个3小时是搞不定的. 经过多少次痛苦的摸爬滚打, 总算是有点收获了. 现总结如下:
1. 连不上先看看ActiveSync是否正常工作(有时候微软的东西就是很奇怪, 明明USB接口接的好好的, 就是没连上)
2. 如果ActiveSync是连上了, 看看是否能在资源管理器里查看PDA上的内容.
3. 使用IDE里的工具菜单里的连接设备, 在出现的窗口中选择你的设备(Pocket PC), 双击或点连接, 等上一会儿, 如果连接不上的话, 与此同时, 一个无情的对话框告诉你: Deploying to Pocket PC Device using TCP Connect Transport Error: Cannot establish a connection. Be sure the device is physically connected to the development computer. (对不起, 我的是英文版的, 众兄将就一下吧). 那恭喜你了, 你的恶梦开始了. 传说中的问题出现了……

你现在只有几个办法可以解决它(我从最痛苦的说起, 让你有种先苦后甜的感觉也不错的).
1. 据微软官方网站说, 你需要重装Visual Studio 2003 (很对不起, 请允许我说一声,拷, 据然是个BUG! 这谁能受得了呀.)
    http://support.microsoft.com/?kbid=813579, 不过……下面的仁兄也挺悖的(据然reinstall/uninstall多次后才有结果, 不过有结果也算是好的了, 没惨到重装操作系统应该好不少了).   http://weblogs.asp.net/dreilly/archive/2003/12/19/VSNetCFDeployment.aspx
2. 重装ActiveSync, 这个应该是最好的办法了, 也是我今天把问题解决的方法. 其实很简单, 不过我也不知道为什么? 呵呵, 就是把ActiveSync Uninstall后再reinstall, 同时保证装在与上次不同的盘上(或许不同的路径也可以吧, 如果你有时间可以试一下). 结果重启后果然行了. 可以连接到PDA, 同样也可以Deploy到PDA上.

希望对各位仁兄会有所帮助. 最好一次成功.

用于 Visual Studio .NET 2003 的 Windows CE 实用工具附加软件包提供了一些工具,利用这些工具可将 Visual Studio 连接到运行 Windows CE 4.1 及更高版本的设备。利用该附加软件包可以通过 ActiveSync 进行连接,或者可通过以太网(不需要 ActiveSync)直接进行连接。

该下载文件中包含以下实用工具:

    * Windows CE CPU Picker(Windows CE CPU 选择器),用于具有 ActiveSync 的设备
    * Smart Device Authentication Utility(智能设备身份验证实用工具),用于没有 ActiveSync 的设备
    * 在基于 x86 的 Windows CE 设备上启用调试的设置
    * 在某些设备上启用调试所需的组件
    * 解决与 Pocket PC 和非 Pocket PC 设备连接时所发生的已知问题的工具。
    * 解决 SDK emulators 的 XML skin 文件未打开这个已知问题的工具。
    http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=7ec99ca6-2095-4086-b0cc-7c6c39b28762

   
I have a VS 2003 ppc project, but when attempting to debug it will not connect to a ppc instance running through device emulator 2.0 preview which is successfully connected through activesync 4.2.

VS 2003 reports;

Deploying to Pocket PC Device using TCP Connect Transport

Error: Cannot establish a connection. Be sure the device is physically connected to the development computer.

I am running norton anti virus 2006 but have switched off the firewall.  The windows XP firewall is disabled.

Does anyone have any ideas why its not connecting?

I solved the problem the following way, after reading lots of posts and pages:

1.- Downloaded the Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1 from http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762&displaylang=en   you might want to change the language.

2.- Went to the folder where these utilities are installed something like <put path here>\\Microsoft Visual Studio .NET 2003\\CompactFrameworkSDK\\WinCE Utilities

3.- And selected the utility Select WinCE CPU, what I found is that it wasn\’t configured, so I chose in this case an ARMV for an IPAQ rx3715, pressed configure and re-launched VS2003

4.- Connected the PDA and pressed the "connect to device" option, voila…its connected.

Finally I applied the upgrade to ActiveSync 4.2 and it\’s still working.

Hope this helps someone out there,

Regards,

Arvychile

标签:, , , , , , , ,

20070629 VS2003 VS2005 移动WEB 模拟器 - 十一月 30, 2007 by yippee

20070629 VS2003 VS2005 移动WEB 模拟器
http://www.yippeesoft.com

vs2005的SP1才新增ASP.NET WEB 应用程序
VS2003支持ASP.NET 移动 WEB应用程序开发
VS2005的网站--新增移动窗体

使用多种模拟浏览器均能正常浏览WML,但不能浏览VS2005生成的ASPX

winwap40.exe WapDisplayerV1.5.rar ccWAP30.exe 2-61-9_upsdkw40b1e.zip

最后于Openwave Phone Simulator V7 可以

可以使用多种方法查看新编写的 ASP.NET 移动 Web 应用程序。您需要在各种设备和模拟器上彻底测试和查看您的应用程序,确保它支持最多的设备。本节介绍查看移动 Web 应用程序的方法。

使用桌面浏览器
由于 ASP.NET 移动 Web 窗体支持基于 HTML 的浏览器,因此可以使用桌面浏览器查看移动 Web 应用程序。可以使用桌面浏览器调试应用程序,因为它可以显示详细的错误信息,如编译和运行时错误。也可以启用页跟踪并查看页上生成的跟踪信息。

使用模拟器
通常可以获取移动设备的模拟器应用程序。使用模拟器可以从桌面工作站测试应用程序,不需要使用实际的设备或无线连接。模拟器还可以包括附加的开发工具,如查看页的源代码或设备状态的功能。

绝大多数模拟器允许查看在工作站本地安装的应用程序。但某些模拟器可能需要使用附加组件,如网关。

若要确定受支持的设备是否有模拟器,请向设备制造商咨询。若要安装和使用模拟器,请参考模拟器附带的文档

对于 ASP.NET,Microsoft Visual Studio .NET 中的“新建项目”对话框会显示两种 ASP.NET 移动设计器项目类型:

“Visual C# 项目”下的移动 Web 应用程序模板
“Visual Basic 项目”下的移动 Web 应用程序模板
这两个应用程序模板为指定的语言提供基本的文件引用和窗体。选择一个模板,将在 Visual Studio .NET 中创建并打开指定的项目。

以下演练使您了解使用设计器创建移动 Web 应用程序所需的基本步骤。

创建新的 ASP.NET 移动 Web 应用程序

在 Visual Studio 中,创建一个新的 Visual C# 或 Visual Basic 移动 Web 应用程序项目。

在“文件”菜单上,选择“新建”,然后单击“项目”。
在“新建项目”对话框中,请执行以下操作:
在“项目类型”窗格中,选择“Visual Basic 项目”或“Visual C# 项目”。
在“模板”窗格中,单击“ASP.NET 移动 Web 应用程序”。
在“名称”框中,输入项目名称。这也是项目解决方案的名称。
在“位置”框中,输入要在其中创建项目的 Web 服务器的 URL(包括 http://)。
注意   Web 服务器上必须安装有以下软件:Internet 信息服务 (IIS) 5.0 版或更高版本以及 Microsoft .NET Framework。
设计器创建名为 MobileWebForm1 的新移动 Web 窗体页。它还创建以下必需的项目文件:

MobileWebForm1.aspx。ASP.NET Web 窗体页的文件格式。此文件包含 ASP.NET 移动控件的声明格式。
MobileWebForm1.aspx.cs 或 MobileWebForm1.aspx.vb。包含处理事件和执行其他程序任务的代码。
AssemblyInfo.cs 或 AssemblyInfo.vb。包含一组属性,它们提供有关由项目生成的程序集的信息。有关更多信息,请参见程序集概述。
Global.asax 和 Global.asax.cs 或 Global.asax.vb。包含用于响应由 ASP.NET 或 HttpModules 引发的应用程序级事件的代码。这些文件(也称为 ASP.NET 应用程序文件)是可选的。有关更多信息,请参见 ASP.NET 主题 Global.asax 文件。
web.config。包含特定于应用程序的设置。有关更多信息,请参见 ASP.NET 配置。
解决方案资源管理器显示应用程序中的文件和资源。使用此窗口可以查看、添加、移除和重命名列出的文件。

visual studio 2005提供了一组功能强大且友好的开发工具来创建移动web程序,如果你已经有创建传统的asp.net应用程序的经验,那么你就会发现创建移动web 程序和创建传统的asp.net应用程序是非常类似的。你只需要创建一个asp.net网站项目并添加一些移动web窗体即可。当你添加移动web窗体 后,你就会发现在工具箱中添加了如下图所示的asp.net移动控件。
  现在你可以按照如下的步骤在visual studio 2005创建一个新的asp.net 移动web程序:
  1. 选择"文件"-"新建"-"网站"
  2. 在"visual studio已安装的模板"列表中选择"asp.net 网站"
  3. 设置好程序的"位置"、"语言"和"路径"等选项后,单击"确定"按钮。

 当你完成上述步骤后,就已经创建好了一个asp.net 网站。现在我们就可以在该网站中添加一些针对移动设备的web窗体,其具体的实现过程如下:
  1. 在visual studio 2005的"解决方案资源管理器"窗口中选择刚才创建好的网站项目,右键点击并在弹出的菜单中选择"添加新项"命令。
  2. 在弹出的"添加新项"窗体中选择"移动web窗体"项。
  3. 设置窗体的"名称"和"语言"等项,并且确保"将代码放在单独的文件中"选择框处于选中状态。
  4. 单击"添加"按钮。
   当单击"添加"按钮后,你会发现visual studio 2005自动添加了两个文件,在这里窗体名称被设置为"mobiledefault",因此这两个文件分别为mobiledefault.aspx 和mobiledefault.aspx.cs (如果你选择的语言为vb的话,则这两个文件为mobiledefault.aspx和mobiledefault.aspx.vb)。 mobiledefault.aspx文件包含在窗体使用的各个asp.net 移动控件的声明方式,而mobiledefault.aspx.cs则包含了一些程序实现代码和事件处理代码,这和传统的asp.net应用程序采用的" 代码后置"的方式是一致的。

在 Microsoft Visual Studio .NET 中集成 Openwave 模拟器
http://www.microsoft.com/china/msdn/archives/library/dnmitta/html/mmit_openwave.asp

Openwave SDK 4.1.1 包含一个 Openwave 移动浏览器 4.1 模拟器,该模拟器符合 WAP 1.1 标准并能够显示 WML 的内容。Openwave SDK 6.1 包含 Openwave 移动浏览器 6.1,该模拟器符合 WAP 2.0 标准并能够显示 XHTML 移动配置文件和 CSS 的内容。可以使用其中一种模拟器或两者都使用,这取决于您的需要和市场上的目标设备。

ASP.NET 移动控件使您可以为各种各样的移动设备开发应用程序。大多数移动设备的制造商都提供模拟其硬件和浏览器操作的模拟器。模拟器软件使您可以查看 ASP.NET 移动 Web 窗体应用程序显示在制造商的硬件设备上的样子。

除了使用实际设备外还使用模拟器进行开发和测试,这样可以使您在部署移动 Web 应用程序之前更轻松地测试它。
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/mwdesign/html/mworiworkingwithemulatorsandbrowsers.asp

http://msdn2.microsoft.com/zh-cn/library/f38yc3w5(VS.80).aspx

标签:, , , ,

0422 WINCE VS.NET 开发 ActiveSync 模拟器 Emulator Preview - 九月 24, 2006 by yippee

0422 WINCE VS.NET 开发 ActiveSync 模拟器 Emulator Preview activesync

"Microsoft Device Emulator Preview"  Visual Studio 2003 activesync

http://www.yippeesoft.com/blog/p/0420vsnetwceasimg2.php
0420 WINCE VS.NET 开发 ActiveSync 模拟器 2

利用 Microsoft Device Emulator Preview 开发
感觉这个玩艺是从VS2005分离出来的

运行 Register Device Emulator
运行 Device Emulator Manager
运行 Emulate Smartphone-WM 2003 SE(Cold Boot)
 Device Emulator Manager--refresh
选择 CSID,右键 -CRSH
这时候 ACTIVESYNC就和模拟器连接了
然后VS2003,运行程序时选择 SP DEVICE,选择设备,不选择模拟器即可

Device Emulator Preview available on Microsoft Betaplace
The Microsoft Device Emulator Preview 1.0 is available on Microsoft Betaplace. This is an open beta for a stand-alone version of the Device Emulator that ships with Visual Studio 2005 Beta 2. The Guest ID is “MSDEVICE” (case is important—it’s all caps). This is an open Beta and we encourage you to use the emulator and provide us feedback in the Device Emulator Forum.

This preview can connect to Visual Studio 2003 and Embedded Visual C++ using Active Sync. This requires that you use start a Device Emulator and run the Device Emulator Manager, then cradle the emulator in the Manager. This will now allow you to create an ActiveSync partnership and use the emulator as you would any other device. Please note that in this case, you deploy to a device, not to the emulator within Visual Studio or eVC.

This is an English-language only beta release. We will not be shipping the beta in any other languages. See the notes on the beta site for installation isntructions and other important notes.

Is it possible to use the device emulator with VS.NET 2003 so that it can directly be called (for connect/deploy ..etc) from the VS.NET 2003 IDE? 
Yes – just use the Device Emulator Manager to cradle an emulator instance, then tell VS.NET 2003 to connect to a hardware device via ActiveSync.

Thanks Barry.

 I am not sure about such option in VS.NET 2003

I have only two available options in VS.NET 2003

1. Tools->Connect to device  which shows Pocket PC 2002 Emulator (Default) and Pocket PC Device. (I would like to configure it to get an an option to connect to Device Emulator)

OR

2. Tools-> Connect Emulator using Activesync which shows – no pocket PC 2003 or Smartphone 2003 Emulators were found. (I would like to configure it to use the Device Emulator)
Barry was talking about the new, ARM-based, emulator which comes with Visual Studio 2005 and is downloadable separately as \’Microsoft Device Emulator 1.0\’. To use this in VS.NET 2003, run dvcemumanager.exe from (typically) C:\\Program Files\\Microsoft Device Emulator\\1.0. Select the appropriate image – for the sake of example we\’ll use \’Pocket PC 2003 SE Emulator\’ – then choose Actions, Connect from the menu to start the image.

In ActiveSync, go to Connection Settings, and in the \’Allow connections to one of the following\’ drop-down select DMA. In Device Emulator Manager, keeping the running emulator selected, choose Actions, Cradle. ActiveSync should now connect (assuming you don\’t have a physical device already connected).

In VS.NET 2003, you can now connect to your emulator by selecting \’Pocket PC Device\’, just as you would for a physical device.

The VS.NET 2003 emulator is x86-based (using your PC\’s processor directly), based on technology from Virtual PC. They use a very old \’Virtual PC Application Switch\’ driver (I believe). XP SP2 disables this driver because it\’s believed to have problems with No Execute/Execute Disable/Data Execution Prevention (AMD/Intel/Microsoft terminology). If the driver is disabled, IIRC the VS.NET 2003 emulator no longer works.
I m new to using VS2005 for smartphone2003 native development. As it seems I m not very impressed wid its claims of scoring over eVC 4.0. Neways, as I try to deploy any app (even the template for that matter), it shows this error message box–"Failed to open VPC network driver. The driver might not be installed".
MSFT ppl hav any explanation for this behaviour??
I sserched up the forums and got the reason why the error was there. It was because cVC 4.0 SP3 was already installed on my machine. It was preventing the VPC network driver from being installed with whidbey.
  To solve this, (on another machine with eVC installed only) I first uninstalled eVC and then installed VS2005. Thus I got rid of this error. I still dont have a clue how to make both eVC and whidbey run simultaneously. But I doubt why wud anybody want to develop on both IDEs simultaneously.
  So this post can be considered closed.

标签:, , , , , , , ,
0420 WINCE VS.NET 开发 ActiveSync 模拟器 2 - 九月 21, 2006 by yippee

0420 WINCE VS.NET 开发 ActiveSync 模拟器 2

WINCE VS.NET 开发 ActiveSync 模拟器 1
http://www.yippeesoft.com/blog/p/vsnetwceasimg1.php

今天再次试验了一把 ActiveSync 连接模拟器

卸载了 ActiveSync 4.1,重新安装3.8,再重新安装SDK/模拟器/中文模拟器

. If an SDK such as Smartphone 2003 SDK is installed before the installation of
this tool, the corresponding Device/Emulator may not appear in the device list
of any remote tool. When that happens, re-install the SDK.

Chinese Simplified Emulation Images.msi
Windows Mobile 2003 Second Edition Emulator Images for Smartphone – WWE.msi
Microsoft SMARTPHONE 2003 SDK.msi

另外就是4.1的问题:
概述
ActiveSync® 4.1 is the latest sync software release for Windows Mobile 5.0-based devices.

Microsoft ActiveSync provides a great synchronization experience with Windows®-based PCs and Microsoft Outlook right out of the box. ActiveSync acts as the gateway between your Windows-based PC and Windows Mobile-based device, enabling the transfer of Outlook information, Office documents, pictures, music, videos and applications from your desktop to your device. In addition to synchronizing with a desktop PC, ActiveSync can synchronize directly with Microsoft Exchange Server 2003 so that you can keep your e-mail, calendar data, notes and contact information updated wirelessly when you’re away from your PC.*

New features include:
• New partnership wizard to help customers more easily setup a sync partnership
• Faster transfer of data files including media
• Ability to sync photos assigned to contacts from Outlook on the desktop

ActiveSync 4.1 supports PC sync via USB cable, Bluetooth, or infrared connection.

NOTE:
Faster file transfer speed and photo sync via Outlook are only available for Windows Mobile 5.0-based devices.

Remote PC Sync (via Wifi or LAN) has been removed due to Enterprise customer feedback around security issues. If you are using this feature on a Windows Mobile 2003-based device, please continue using ActiveSync 3.x or earlier.

Beginning in 2006, customers using Microsoft Exchange 2003 Service Pack 2 with devices running the Messaging and Security Feature Pack for Windows Mobile 5.0 will benefit from the following feature enhancements in ActiveSync 4.1: DirectPush Mail, local device wipe, and certificate-based authentication to Exchange Server.

*Connectivity and synchronization may require separately purchased equipment and/or wireless products (e.g., WiFi card, network software, server hardware, and/or redirector software). Service plans are required for Internet, WiFi and phone access. Features and performance may vary by service provider and are subject to network limitations. See device manufacturer, service provider and/or corporate IT department for details.

Remote PC Sync (via Wifi or LAN) has been removed

原来如此

另外就是WINXP的防火墙,否则会报告 服务失败

honghuili 2005-11-3 02:59
 
Microsoft Device Emulator Preview的使用

近日从SP过渡到PPC阵营。以前在PC机上装过Microsoft Device Emulator Preview,也没怎么用。现在,可以先在这个模拟器上做做试验,然后再折磨我的818:-)

经过几天的折腾,感觉不是很好。资源占用比较高,而且还不稳定——可能和我在模拟器上瞎装软件有关吧。最要命的是:模拟出来的PPC是32Mb的,还是英文系统。装上中文支持,后台再多跑几个程序,内存空间就剩不下多少了。在模拟器选项中到是有RAM SIZE一项,但是灰色的,没法修改。不过,既然有这么一个选项,说明这个参数是可以修改的。

昨天晚上终于决定要仔细研究一下这个模拟器软件了。在安装目录下,DeviceEmulator.exe竟然需要在命令行模式下运行,呵呵,参数还不少,看来还有戏。

选几个比较重要的参数:
/a:保持模拟器窗口总在最前面
/flash filename:用一个文件模拟Flash memory。我用了一下,PPC上出现了一个NAND Flash目录,可以拷贝文件到这里。不清楚PPC上的这个目录在现实中是怎么出来的,SD和CF卡都不是这样的目录名吧?或者,是有备夹的那种机器,能插U盘?呵呵,请用过的解答一下。
/hostkey keyiname:指定热键
/language LangID:[color=Red][b]指定用户界面语言[/b][/color],LangID是4位的十进制数。可以指定语言?微软这么牛,25.5Mb的PPC_2003_SE_WWE_ARMv4.bin文件(PPC 2003SE的模拟器)中还能包括若干种语言?我还窃喜了一阵——终于可以不用装什么什么中文支持包了,可以节省不少内存。但后来试了几次,用了若干个十进制数,都是英文界面。上当,上当。不过,既然有这个参数,说明是可以指定语言的。究竟怎么使用,我想还是用VS编程的朋友们知道些吧。请高手指点。
/memsize size:呵呵,主角来了。[b][color=Red]指定模拟器RAM大小[/color][/b],单位是Mb。可以是64——256Mb间任意大小,默认为64Mb,后来试了试,如果要模拟64Mb的机器,需要在这里设置为98Mb左右。为什么?我猜测,可能是把操作系统占用的空间,大约3xMb也都算进去了。可这3xMb的空间应该算是ROM吧?
/rotate angle:旋转屏幕方向,可以是0,90,180和270度。
/s filename:指定保存模拟器状态的文件名。
/sharedfolder directoryname:指定一个目录,其中的内容即为PPC的Storage Card。
/skin filename:加载皮肤,呵呵,就是PPC的外壳,没什么用处。
/video xx:指定窗口大小和色深
/z:放大窗口为原来的两倍

现在,我们可以指定模拟器的运行参数,看看我的例子。在命令行窗口中运行如下命令(在Device Emulator Preview目录中):
DeviceEmulator /memsize 98 /s myppc PPC_2003_SE\\PPC_2003_SE_WWE_ARMv4.bin
指定模拟器RAM为98Mb(实际为64Mb),退出时保存状态到myppc文件文件中。如果想在退出之后重新进入该模拟器,可以在Device Emulator Manager中,点击菜单:File-Restore Image……在弹出的对话框中选择myppc即可。

标签:, , , , , , , ,
0103 VS2005 ActiveSync 同步 模拟器 - 二月 2, 2006 by yippee

0103 VS2005 ActiveSync 同步 模拟器

1、打开  Visual Studio 2005 (beta 2)。

2、单击 Tools —>Connect to Device (该步也可以直接在3步即Device Emulator Manager 中实现,只要右击 Windows Mobile 5.0 for Smartphone Emulator ,然后点击"Connect",就可以启动模拟器),在Platform 下,选择Windows Mobile 5.0 Smartphone SDK,在Devices 下选择Windows Mobile 5.0 for Smartphone Emulator,

然后 点击 OK ,连接;当连接成功后,会出现如下图的提示
点击 Close ,完成。
3、单击 Tools —-> Device Emulator Manager ,在打开的Device Emulator Manager 窗口中,单击 Windows Mobile 5.0 Smartphone SDK 以展开Smartphone 设备和模拟器,会看到 Windows Mobile 5.0 for Smartphone Emulator 前面有个绿色的图标,
表示模拟器已连接成功,右击 Windows Mobile 5.0 for Smartphone Emulator ,点击 Cradle ;
此时桌面右下角的ActiveSync图标,会变成绿色,而且是旋转的光盘似的。而且Windows Mobile 5.0 for Smartphone Emulator 前面的图标也发生了变化:
 4 、如果ActiveSync图标没有变化,也可以自己打开ActiveSync 4.0 ,当然要把允许使用DMA给钩上,然后,点击”Connect",同步过程如下:
5、连接成功后,打开“我的电脑”—>Mobile Device(这个选项,只要安装了ActiveSync就有),可以看到两个文件选项:一个是 My Windows Mobile-Based Device(里面是设备的主要文件所在)打开,可以看到如下的图片:另一个是 My Pictures ,就只有两张图片。
    但是奇怪的是如果你用Remote Tools 中的Remote File Viewer查看模拟器上文件,就会发现有些文件,在下面的文件目录下找不到。
    注:如果你看到以下的某些文件,只要点击"工具"——>"文件夹选项"——>"查看",在"隐藏所有文件和文件夹"下选择"显示所有文件和文件夹",就可以了 。
smartphone手机可以使用外置的存储卡来进行扩充,一般采用SD卡或者Mini SD卡,因为手机本身的存储空间非常有限,因此,我们一般会把资源、程序等放在存储卡上。Folder Sharing的作用就是让你指定一个PC机上的目录,然后,模拟器会把这个目录内容解释成你的存储卡内容。

smartphone安装软件的说明

  在smartphone上安装软件有三种情况,一种是软件本身提供安装程序,这个比较简单,将smartphone连机,运行安装程序即可;第二种情况,提供的安装文件是.cab格式的。由于smartphone没有提供资源管理器,安装文件即使拷贝到手机里,也不太好安装,所以解决方法是找一个smartphone上用的文件管理器装上(例如Resco Explorer),然后把要安装的文件拷到手机里,在文件管理器里执行即可;第三种情况,是可执行程序,方法是将文件拷到手机里,在手机里开始菜单文件夹里建立一个快捷方式即可。

Install the Tools You Need to Get Started Today
Installation Files and Instructions
To get started developing for Windows Mobile 5.0, follow these five easy steps:

1. Uninstall Visual Studio.
Uninstall all other versions of Visual Studio. If you\’ve been using previous builds of Visual Studio 2005 Beta, it\’s recommended that you start with a clean computer or follow these uninstall tips. If you have eMbedded Visual C++ or other tools installed, consult the appendix to the white paper Introduction to Development Tools for Windows Mobile-based Devices.

2. Install Visual Studio 2005
Visual Studio 2005 is the single tool for Windows Mobile 5.0 application development. Visit the Visual Studio 2005 Developer Center to learn how you can purchase Visual Studio 2005.

3. Install ActiveSync 4.1.
ActiveSync allows for connectivity between Visual Studio 2005 and Windows Mobile based devices.

Download ActiveSync 4.1.

4. Install Windows Mobile 5.0 SDKs.
The Windows Mobile 5.0 SDKs for Pocket PC and Smartphone enable development for Windows Mobile-based devices in Visual Studio 2005.

Download Windows Mobile 5.0 SDK for Pocket PC.
Download Windows Mobile 5.0 SDK for Smartphone.

5. Optional Tools.

Download Windows Mobile 5.0 SDK for Pocket PC.
Do you want to include server components in your application? The Redistributable Server Components for Windows Mobile 5.0 package contains optional redistributable server components (such as MSMQ, HTTPD, PeerNet, UPnPCtrl, and UPnPHost) that you can incorporate into your own applications.
Localized Emulator Images for Windows Mobile 5.0-based Pocket PCs.
Building Pocket PC applications for non-English locales? Choose from the 18 emulator images for Windows Mobile 5.0-based Pocket PCs that have been localized for various geographies.
Localized Emulator Images for Windows Mobile 5.0-based Smartphones.
Building Smartphone applications for non-English locales? Choose from 24 emulator images for Windows Mobile 5.0-based Smartphones that have been localized for various geographies.
Virtual PC Network Driver.
The Virtual Machine Network Driver allows the Device emulator\’s OS (or even the Virtual PC OS, as the case may be) to emulate its own network connection. Because the physical network interface on the host machine is now "virtualized," you have a way to get two IP Addresses – one for the host PC, and one for the operating system that is running within the Device Emulator (or Virtual PC). Device Emulator users using the VMNet Driver can connect to the host machine over TCP or UDP as the alternative to the standard "Activesync over DMA" solution.
.NET Compact Framework 2.0 Redistributable.
The Microsoft .NET Compact Framework version 2.0 redistributable package is the most recent update to the Microsoft .NET Compact Framework and includes everything you need to run applications on devices developed using the .NET Compact Framework.

标签:, , , , ,
WebRequest 模拟 SUBMIT POST 资料 - 十一月 25, 2005 by yippee

WebRequest 模拟 SUBMIT POST 资料

很多事情就象滚雪球一样,不断的扩大,今天搞了半天,发现了许多资料,姑且记录一下

起因:
海峡都市报上面有 宝宝照片 评比,我妈就要我放上去,结果放上去之后,发现要投票,然后我LP就下命令要多投票。

然后我就想,是不是可以用个程序来投票,总算模拟输入了一个页面。结果我发现一个IP只能投票一次。并且还有校验码。

PROXY的问题倒还是可以解决,通过设置PROXY,访问网页校验等。我还想可以的话,可以把金山词霸在线弄到桌面~

姑且记录一下资料

摩诘 我思故我在 常辨而常新
自动向网页Post信息并提取返回的信息
http://dragon.cnblogs.com/archive/2005/06/15/174946.aspx

要从HTML网页中提取信息,首先得将网页代码格式化成XML形式的文件,然后可以用XPath很方便的提取出自己想要的信息,要将HTML格式化为XML形式,目前有几个选择
1、   Chris Lovett的SgmlReader:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=b90fddce-e60d-43f8-a5c4-c3bd760564bc

2、   Simon Mourier的.NET Html Agility Pack
http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx

Simon Mourier\’s WebLog  .Net tools and sample code
.NET Html Agility Pack: How to use malformed HTML just like it was well-formed XML…
http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx

ocean 嘿嘿,我的地盘由我来
如何编写一个自动投票程序
http://www.cnblogs.com/ocean/archive/2005/02/01/100445.html

GotDotNet User Sample: SgmlReader 1.5
SgmlReader is an XmlReader API over any SGML document including HTML and OFX for example. A command line utility is also provided which outputs the well formed XML result. HTML is an SGML grammar, so you can use this tool to convert HTML into well-formed XML.

通过解析HTML读取数据
http://www.ftponline.com/china/XmlFile.aspx?ID=251

两个分析HTML网页的方法
http://blog.joycode.com/mvm/archive/2004/04/27/20352.aspx

SGMLReaderDemo.aspx.cs
http://www.xmlforasp.net/codebank/util/srcview.aspx?path=../../CodeBank/System_Xml/XmlTextReader/SGML/SGMLReaderDemo.src&file=SGMLReaderDemo.aspx.cs&font=3

顺便记录了一些语言创始人
John Backus,Fortran之父
Alain Colmerauer, Prolog之父
Jean Ichbiah, Ada之父
C语言宗师Brain Kernighan
UNIX/C创造者Ken Thompson 和 Dennis Ritchie
Smalltalk之父Alan Kay
Simula 67之父Kristen Nygaard
Objective-C之父Brad Cox
C++之父Bjarne Stroustrup
C#之父Anders Hejlsberg
Java之父James Gosling
Thomas Kurtz, Basic之父
Larry Wall, Perl之父
Guido van Rossum, Python之父
松本行弘, Ruby语言之父

Matz: 就是 松本行弘
loop do 
 read and reply mails 
 write code 
 write document/article/book 
 write code
end

标签:, , , ,
VS.NET PROCESS 输入 输出 模拟 CMD - 十一月 10, 2005 by yippee

1101 VS.NET PROCESS 输入 输出 模拟 CMD 很久以前的老文章

vs.net c# 一个调用外部程序的例子 http://www.yippeesoft.com/blog/p/vsnetStartInfoProcess.php Process.StandardOutput 属性 http://www.yippeesoft.com/blog/p/ProcessStandardOutput.php

今天看到有人回复 www.yippeesoft.com 有关程序中调用执行控制台应用程序并交互疑问!和楼主的文章最后一个问题相似。输入一个命令,获得输出,判断该输出内容并输入相应命令,再获得输出值…重复以上动作。 www.yippeesoft.com

试验了一下 要使用 StandardInput,必须已为 StartInfo 属性的 RedirectStandardInput 属性指定了 true。否则,读取 StandardInput 属性将引发异常。
注意   如果要将 StandardInput 设置为 true,则 StartInfo 属性上的 UseShellExecute 必须为 false。
www.yippeesoft.com

ProcessStartInfo.RedirectStandardInput 属性请参见
获取或设置一个值,该值指示是否从 Process 实例的 StandardInput 成员读取进程命令输入,从而使您能够从标准输入流(通常为键盘)之外的源进行读取。例如,用于从文件读取数据。

private void DisplayOutput() www.yippeesoft.com
&leftsign;
 while ( proc != null && !proc.HasExited )
  &leftsign;
    string strLine = null;
    while (  ( strLine = proc.StandardOutput.ReadLine() ) != null)
    &leftsign;
   Trace.WriteLine(strLine);
     m_txtOutput.AppendText( strLine + "\\r\\n" );
    &rightsign; www.yippeesoft.com

  &rightsign;
&rightsign; www.yippeesoft.com

  Thread m_threadOutput; www.yippeesoft.com
  Process proc; www.yippeesoft.com
  
  private void menuItem1_Click(object sender, System.EventArgs e)
  &leftsign;
   proc = new Process(); www.yippeesoft.com
   proc .StartInfo.FileName = "cmd";
   proc .StartInfo.WorkingDirectory = "c:\\\\";
   proc .StartInfo.CreateNoWindow = true;
   proc .StartInfo.UseShellExecute = false;
   proc .StartInfo.RedirectStandardOutput = true;
   proc .StartInfo.RedirectStandardInput = true;
   proc .Start();  www.yippeesoft.com
   [hide]m_threadOutput = new Thread( new ThreadStart( DisplayOutput ) );
   m_threadOutput.Start(); [/hide]
  &rightsign; www.yippeesoft.com

private void menuItem3_Click(object sender, System.EventArgs e)
  &leftsign; www.yippeesoft.com
   proc.StandardInput.WriteLine("dir");
  &rightsign;

如何在图形界面中实时捕获控制台程序的标准输出
http://www.contextfree.net/wangyg/b/tech/myide.html

ShellControl – A console emulation control
http://www.codeproject.com/cs/miscctrl/shellcontrol.asp

1.判断命令是否执行结束并获得这个命令执行后返回的结果?(连续执行多个命令)
DOTNET程序获得输出不全.
当直接执行控制台程序,在控制台中输入命令,执行完成后为出现 "XXX>"提示符等待继续输入.
由于程序采用多线程执行,本想用 "XXX>"提示符号, 来判断命令是否执行结束.
如果程序执行后,获得该命令执行得到的返内容,在执行下一命令…
但DOTNET程序却无法获得这一符号.而java写的程序却都能得到.

标签:, , ,
WINCE VS.NET 开发 Internet 模拟器 - 十月 13, 2005 by yippee

Catalog > Microsoft Smartphone > Smartphone 2002 operating system > How to connect Smartphone 2002 Emulator to the Internet
http://msmobiles.com/catalog/i.php/158.html
How to connect Smartphone 2002 Emulator to the Internet

This assumes that your desktop computer can access the internet without any proxy in your network settings  www.yippeesoft.com

The Smartphone 2002 emulation needs to have a "proxy" set up that connects "My Corporate Network" to "The Internet" but that "proxy" does not need a machine name or port.

From the Home Screen on your SPV, press the left SoftKey "Programs"
Press "8" to launch the Settings program
Press "7" to select the Data Connections setting
Press the right SoftKey "Menu"
Highlight the "Edit Connections" Menu Item
Press the "Action" key  www.yippeesoft.com
Press "3" for editing your Proxy Connections
Press the right SoftKey "Menu"
Highlight the "Add Menu" Menu Item
Press the "Action" key  www.yippeesoft.com
Type in any text into Description Edit Box (i.e., your machine name)
Press the "Down Arrow" key to get to "Connects From:" Spin Control
Press the "Right Arrow" 3 times to get to "My Corporate Network"
Press the "Down Arrow" key to get to "Connects To:" Spin Control
Press the "Left Arrow" key to get to "The Internet"
Press the left SoftKey "Done" to get back to the Proxy Connections Window
Press the left SoftKey "Done" to get to the Connections Window
Press the left SoftKey "Done" to get to Data Connections Window
Press the left SoftKey "Done" to get to the Settings Window
Press the left SoftKey "Done" to get to the Programs Listing
Press the left SoftKey "Home" to get back to the Home Screen

You will also need to verify that your desktop磗 ActiveSync application is set up to allow your SPV to use the desktop磗 internet connection.
From your desktop, open the ActiveSync program
Press the "Options" button on the ActiveSync dialog box
Select the "Rules" tab of the Options dialog box
Verify that the "Connection:" drop down selection box says "The Internet"
Press the "OK" button to close the Options dialog box.

You should now be able to connect to the internet with the Pocket Internet Explorer located in the Smartphone 2002 Emulator  www.yippeesoft.com

Catalog > Microsoft Smartphone > Smartphone 2003 operating system > How to connect Smartphone 2003 Emulator to the Internet
http://msmobiles.com/catalog/i.php/375.html

How to connect Smartphone 2003 Emulator to the Internet

After making some settings:
… you can have full access to Internet inside of your Smartphone 2003 emulator (screenshot below shows mobile.msmobiles.com – a mobile version of this website):

Below instructions follow how to do it!

This assumes that your desktop computer can access the internet without any proxy in your network settings

The Smartphone 2003 emulation needs to have a "proxy" set up that connects "My Corporate Network" to "The Internet" but that "proxy" does not need a machine name or port.
From the Home Screen on your Smartphone 2003 emulator, press the left SoftKey "Start"
navigate to the Settings program
navigate to Data Connections setting
Press the right SoftKey "Menu"
Highlight the "Edit Connections" Menu Item
Press the "Action" key
Press "3" for editing your Proxy Connections
Press the right SoftKey "Menu"
Highlight the "Add Menu" Menu Item
Press the "Action" key
Type in any text into Description Edit Box (i.e., your machine name)
Press the "Down Arrow" key to get to "Connects From:" Spin Control
Press the "Right Arrow" 3 times to get to "Work"
Press the "Down Arrow" key to get to "Connects To:" Spin Control
Press the "Left Arrow" key to get to "The Internet"
Press the left SoftKey "Done" to get back to the Proxy Connections Window
Press the left SoftKey "Done" to get to the Connections Window
Press the left SoftKey "Done" to get to Data Connections Window
Press the left SoftKey "Done" to get to the Settings Window
Press the left SoftKey "Done" to get to the Programs Listing
Press the left SoftKey "Home" to get back to the Home Screen

浏览中文网页乱码,浏览WAP.SINA.COM报告 不支持FRAME

备注: www.yippeesoft.com
Question
Why I cannot connect to the Pocket PC emulator when I am offline? It shows "Timeout: Failed to connect to the device" error message. Old Pocket PC 2000 Emulator works without any problems. How can I solve this problem with Pocket PC 2002 Emulator?
Answer
Pocket PC 2002 Emulator uses TCP/IP and cannot work without at least one open TCP/IP connection. You can setup Microsoft Loopback Adaptor and the emulator will use this connection. Here are step-by-step instructions how to setup Microsoft Loopback Adaptor under Windows 2000 and Windows XP.

我使用中文版本和英文版本均测试PASS www.yippeesoft.com
新建了一个CMD,启动中文模拟器:
start "" "C:\\Program Files\\Windows CE Tools\\Common\\Platman\\bin\\PBEmulator.exe" /MemorySize 128 /Fastbackground /Skin "D:\\ms\\wince\\sp2003\\Emulation\\smartphone_emulator_skin.xml" /CEImage "D:\\ms\\wince\\sp2003\\Emulation\\SP_2003_WWE_VIRTUAL_RADIO.binc" /VMName "Smartphone 2003 – Smartphone 2003 Emulator" /HostKey 165
增大了内存。

开始--设置--其他--数据连接-- www.yippeesoft.com
INTERNET连接--右键菜单--编辑--
代理服务器连接--右键菜单--添加--
连接方-单位 连接到-INTERNET 代理服务器 www.yippeesoft.com:80

输入数字经常要切换 NUMBE 否则 方向键会变成数字建~

标签:, , , , , , , ,
WINCE VS.NET 开发 ActiveSync 模拟器 2 - 十月 12, 2005 by yippee

我也试验了: www.yippeesoft.com
D:\\ms\\wince\\sp2003\\Tools>emuascfg www.yippeesoft.com
Emulator ActiveSync Configuration Utility v1.0
==========================================================
Usage:
  EmuASCfg /PPC [platform] [device]      Configure Pocket PC 2003 Emulator
  EmuASCfg /SP  [platform] [device]      Configure Smartphone 2003 Emulator
  EmuASCfg /L                            List available PlatMan platforms and de
vices
  [platform]     Optional.               Specifies platform identifier (default:
 POCKET PC 2003 &line; SMARTPHONE 2003).
  [device]       Optional.               Specifies device identifier (default: P
OCKET PC 2003 EMULATOR &line; SMARTPHONE 2003 EMULATOR).
  *You should make sure the emulator has booted successfully before running this
 tool.

D:\\ms\\wince\\sp2003\\Tools>emuascfg /SP
Emulator ActiveSync Configuration Utility v1.0
==========================================================
Connecting to specified device [Platform:SMARTPHONE 2003, Device:SMARTPHONE 2003
 EMULATOR]…
Setting local ActiveSync registry settings…
Creating XML files for device provisioning…
Deploying XML provisioning files and tools…
Configuring device-side ActiveSync settings…
Completing device provisioning, please wait…
Configuration complete.
D:\\ms\\wince\\sp2003\\Tools>emuascfg

结果一同步就报告:
关键性通信服务启动失败,请尝试重置移动设备,然后重新连接
网上找到的资料要不就是说防火墙问题,要不就是说
4: 出现“关键性通信服务启动失败。请尝试重置移动设备,然后重新连接。”
答:打开ActiveSync的连接窗口:
在[文件]>[连接设置]里,根据你的连接类型(红外或连接线),正确的勾选所有的选项。
具体操作—-
1、勾取“允许通过COM端口上的串行电缆或通过红外线端口建立连接”;并在该项目的下拉窗口里选择正确的端口。
2、勾取“允许通过USB端口建立连接”; www.yippeesoft.com
3、手机里打开的ActiveSync软件中,[服务器设置]里的所有项目都可以不选取,(服务器名称,域, 留空不用填);
[PC 设置]里,在[使用移动日程安排与此PC同步]项下,取消前面的勾(即确认不要打勾)
4、电脑上打开的的ActiveSync软件窗口中,按[选项]>[同步选项]里,也全部留空。到有需要时再手工同步就行了。

继续看:这是帮助里面的 www.yippeesoft.com
Using ActiveSync Over Virtual Switch
Configure the emulator to use Virtual Switch. For more information, see Changing Ethernet Support in the Emulator .
Start the emulator.
Open the SDK command prompt, found under: Start->All Programs->Microsoft Smartphone SDK->Smartphone SDK.
Run emuascfg specifying the /SP flag for the Smartphone emulator. Press Enter, and wait until emuascfg has completed.
Close the command window when it\’s finished.
Confirm that ActiveSync has Allow Network (Ethernet) and Remote Access Service (RAS) server connection with this desktop computer enabled. Find this under ActiveSync\’s Connection Settings dialog.
Switch to the emulator.
Open ActiveSync in the emulator.
Choose "Sync".
The emulator will then connect to the desktop via the ethernet.

看似一样,不过~ www.yippeesoft.com
Accepted Answer from Mikal613 Date: 04/22/2004 07:40PM PDT Grade: A  Accepted Answer 

your error is there bc you cant do that
!!! Microsoft Visual Studio? .NET does not support the virtual switch option. !!!
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide_ppc/htm/intro_to_the_ce_emulator_cbvw.asp

 
Comment from Mikal613 Date: 04/22/2004 07:50PM PDT Comment 
EmuASCfg.exe—This tool configures ActiveSync and the Pocket PC emulator to allow establishment of an ActiveSync partnership over the Ethernet Virtual Switch. You must use eMbedded Visual C++ to boot the Pocket PC emulator using the VirtualSwitch option before running this tool. For usage information, type "emuascfg.exe /?" at the command line
a)one option can be  to share a folder and just send it there:
   http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k3/html/winmob03.asp

Comment from ho_alan Date: 04/22/2004 08:42PM PDT Author Comment 

!!!that means it only supports eVC++ doesn\’t work with VS.net, even VS.net 2003!!!
ok, thanks!

无力~~~~~ www.yippeesoft.com

算了,还有一手~ www.yippeesoft.com
Moving Files to and from the Emulator
Files can be moved to or from the emulator by using any of these methods:

ActiveSync\’s Explore functionality (for more information, see Using ActiveSync with the Emulator).
The Remote File Viewer tool that is available in eVC 4.0. The Export function moves a file from the file system of the development workstation to the file system of the real or emulated Smartphone device. The Import function moves files from the real or emulated Smartphone device to the development workstation file system.
Sharing the files within the development workstation file system and accessing those files by using the File Manager in the emulated Smartphone image.

标签:, , , , , , , ,
WINCE VS.NET 开发 ActiveSync 模拟器 1 - 十月 11, 2005 by yippee

想用 ActiveSync 直接连接 模拟器,结果~
首先:上网搜索 www.yippeesoft.com
Q12. What are the step by step directions for configuring the Emulator and ActiveSync?
The help topic "Using ActiveSync with the Emulator" in the Microsoft Pocket PC 2002 SDK, gives a good description of this.  To find the help topic, open up eVC select Help/Search. Search with the keywords: "activesync emulator".  If you can\’t find this help topic see Q10.

结果:Smartphone 2003 Help www.yippeesoft.com
Using ActiveSync with the Emulator
Connecting to the emulator through ActiveSync is important for convenience in moving files between the desktop computer and the emulator, as well as for testing and debugging custom ActiveSync Sync Providers. The emulator supports ActiveSync between the host computer (with Microsoft ActiveSync version 3.7 installed) and the emulator image.

11.17. How can I allow Activesync to connect to an Emulator session from Visual Studio .NET 2003? www.yippeesoft.com
Download the Emulator ActiveSync Connection Tool from Windows Mobile Developer Power Toys:
http://www.microsoft.com/downloads/details.aspx?FamilyId=74473FD6-1DCC-47AA-AB28-6A2B006EDFE9&displaylang=en
Emulator ActiveSync Connection Tool – Allows Activesync to connect to your Emulator session from Visual Studio .NET 2003.
这个简直就是废话

看看README www.yippeesoft.com
AME:Connect Emulator with ActiveSync
DESCRIPTION:
The tool starts a Smart Device Emulator and establishes an ActiveSync connection with it. It also installs Windows CE remote tools and creates a shortcut on Visual Studio .NET 2003 menu for those tools.

REQUIREMENTS:  .Visual Studio .NET 2003  .ActiveSync 3.7  .Pocket PC 2003 SDK  .Smartphone 2003 SDK  SETUP: Run EMUASCONFIG.MSI

INSTRUCTIONS:
1. Start Visual Studio .NET 2003.
2. Start "Connect Emulator with ActiveSync" from the Tools menu.
3. From the "Connect Emulator with ActiveSync" dialog, select an Emulator from the dropdown list.
4. Ensure the selected Emulator is not running yet.
5. Click the Connect button. The Emulator will be started and an ActiveSync connection will be established with it.
6. Once the connection is ready, it is OK to close the tool by clicking Exit from the menu.
7. To use the Windows CE Remote Tools, start "External Device Tools" from the Tools menu of Visual Studio .NET 2003. The folder containing the remote tools will be opened. Start any tools from the folder.

KNOWN ISSUES:
. If an SDK such as Smartphone 2003 SDK is installed before the installation of this tool, the corresponding Device/Emulator may not appear in the device list of any remote tool. When that happens, re-install the SDK.
 . During the setup, the machine may encounter a brief network disconnection.

好像说的很简单,可是我每次都是ERROR。

http://www.experts-exchange.com/Operating_Systems/WinCE/Q_20963117.html
有人问: I am using VS.net 2003 (C#) to write ppc application and using the emulator in VS.net 2003. how can I use ActiveSync to move files to and from the ppc emulator?

回答 Comment from Mikal613 Date: 04/22/2004 06:10AM PDT  Comment 

You can establish a connection to the Emulator with Microsoft? ActiveSync? 3.5. You cannot establish a connection with earlier versions of ActiveSync.
To configure the Emulator to establish a connection with ActiveSync
1. Connect two serial ports with a null modem cable.
2. On your development workstation, install ActiveSync3.5.
3. From the Target menu, choose Configure Remote Connection, and then choose the Services tab.
4. From the Download box, choose Emulator, and then choose Configure.
5. If KITL is built into your OS image, from the Serial Port 2 box choose COM1 or COM2, and then from the Serial Port 1 box choose None.
- or –
If KITL is not built into your OS image, from the Serial Port 1 box choose COM1 or COM2, and then from the Serial Port 2 box choose None.
6. Choose OK, and then choose OK again.
7. Configure ActiveSync 3.5 to connect to the serial port — either COM1 or COM2 — that you did not assign to the Emulator.
source: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcepb40/htm/_pbplatman_tcpip.asp

结果 have checked in MSDN it said it\’s not necessary to make a null serial connection.it can establish connection by emuascfg www.yippeesoft.com

然后:To open the SDK command prompt, click Start, point to All Programs, click Microsoft Pocket PC SDK, and then click Pocket PC SDK.
Run emuascfg, specifying the /PPC flag for the Pocket PC emulator, and then press ENTER.
Note   The use of emuascfg is dependent on having the .NET Framework installed. Otherwise, the "The dynamic link library mscoree.dll could not be found…" error message appears. If you need to download and install the .NET Framework, visit the .NET Framework Software Development Kit Version 1.1 download page.

When the command is finished running, close the command prompt window.
In ActiveSync, in the Connection Settings dialog box, confirm that Allow Network (Ethernet) and Remote Access Service (RAS) server connection with this desktop computer is selected.
Switch to the emulator.
Open ActiveSync in the emulator.
Click Sync

标签:, , , , , , , ,
WINCE VS.NET 开发 中文 模拟器 - 十月 10, 2005 by yippee

D:\\ms\\wince\\sp2003CNimg www.yippeesoft.com
Chinese Simplified Emulation Images.msi
SP_2003_CHS.bin 15.0 MB (15,788,923 字节)
SP_2003_CHS_VIRTUAL_RADIO.bin 15.0 MB (15,794,099 字节)

3) Localized Emulation Iamges for Windows Mobile 2003-based Smartphones
若开发简体中文程序它应该是Smartphone 2003 SDK Chinese Simplified Emulation Images.msi。它可以使你的模拟器具备显示中文的能力。
4、安装 Localized Emulation Images for Windows Mobile? 2003-based Smartphone
  对于Mobie设备开发而言,模拟器是非常重要的,它用来模拟真实的smartphone设备,让你能够在Windows桌面平台上调试验证你的程序而不需要连接到一个真实设备,在smartphone的sdk中已经包含了一个英文的模拟器,这里我们要安装的是一个简体中文的版本,安装文件是Smartphone 2003 SDK Chinese Simplified Emulation Images,它让我们可以在模拟器上显示中文内容。 www.yippeesoft.com

D:\\ms\\wince\\sp2003 www.yippeesoft.com
Microsoft SMARTPHONE 2003 SDK.msi
D:\\ms\\wince\\sp2003\\Emulation
SP_2003_WWE.bin 12.5 MB (13,162,383 字节)
SP_2003_WWE_VIRTUAL_RADIO.bin 12.5 MB (13,167,539 字节)

中文化就很简单了,将中文的两个BIN文件复制到原来英文BIN文件目录,改名原英文BIN,将中文BIN改名为英文BIN名字 www.yippeesoft.com

如果没有先安装ACTIVESYNC,那么Microsoft Smartphone 2003 SDK会缺少一个快捷方式
Smartphone 2003 Emulator D:\\ms\\wince\\sp2003\\Emulation\\emul.cmd Smartphone 2003 Emulator Link www.yippeesoft.com

start "" "C:\\Program Files\\Windows CE  Tools\\Common\\Platman\\bin\\PBEmulator.exe" /MemorySize 48 /Fastbackground /Skin "D:\\ms\\wince\\sp2003\\Emulation\\smartphone_emulator_skin.xml" /CEImage "D:\\ms\\wince\\sp2003\\Emulation\\SP_2003_WWE_VIRTUAL_RADIO.bin" /VMName "Smartphone 2003 – Smartphone 2003 Emulator" /HostKey 165

中文BIN的安装卸载是通过VBS脚本进行的
install_script.vbs www.yippeesoft.com
ON ERROR RESUME NEXT

regVSUILanguage     = "HKCU\\Software\\Microsoft\\VisualStudio\\7.1\\General\\UILanguage"
defaultVSUILanguage = "1033"

Dim objWshShell, strVSLocale
Dim objFSO, strVSXMLFilePath, objVSXMLFile, strNewVSXMLFilePath

Set WshShell = CreateObject("WScript.Shell")
strVSLocale = WshShell.RegRead(regVSUILanguage)

If StrComp(strVSLocale, defaultVSUILanguage, 1) <> 0 Then
   strAPPDATA = WshShell.ExpandEnvironmentStrings("%appdata%")
   intSlashIndex = InStrRev(strAPPDATA, "\\", -1, 1)
   strApplicationDataDirectory = Right(strAPPDATA, Len(strAPPDATA) – intSlashIndex)

   strVSXMLFilePath = WshShell.ExpandEnvironmentStrings("%allusersprofile%") & _
    "\\" & strApplicationDataDirectory & _
    "\\microsoft\\visualstudio\\devices\\addons\\microsoft.smartphone2003.1.0.1033.xml"

   Set objFSO = CreateObject("Scripting.FileSystemObject")
   Set objVSXMLFile = objFSO.GetFile(strVSXMLFilePath)

   strNewVSXMLFilePath = WshShell.ExpandEnvironmentStrings("%allusersprofile%") & _
    "\\" & strApplicationDataDirectory & _
    "\\microsoft\\visualstudio\\devices\\addons\\microsoft.smartphone2003.1.0." & strVSLocale & ".xml"

   objVSXMLFile.Copy(strNewVSXMLFilePath)
End If

uninstall_script.vbs
ON ERROR RESUME NEXT www.yippeesoft.com

regVSUILanguage     = "HKCU\\Software\\Microsoft\\VisualStudio\\7.1\\General\\UILanguage"
defaultVSUILanguage = "1033"

Dim objWshShell, strVSLocale
Dim objFSO, strVSXMLFilePath, objNewVSXMLFile, strNewVSXMLFilePath

Set WshShell = CreateObject("WScript.Shell") www.yippeesoft.com
strVSLocale = WshShell.RegRead(regVSUILanguage)

If StrComp(strVSLocale, defaultVSUILanguage, 1) <> 0 Then
   strAPPDATA = WshShell.ExpandEnvironmentStrings("%appdata%")
   intSlashIndex = InStrRev(strAPPDATA, "\\", -1, 1)
   strApplicationDataDirectory = Right(strAPPDATA, Len(strAPPDATA) – intSlashIndex)

   strNewVSXMLFilePath = WshShell.ExpandEnvironmentStrings("%allusersprofile%") & _
    "\\" & strApplicationDataDirectory & _
    "\\microsoft\\visualstudio\\devices\\addons\\microsoft.smartphone2003.1.0." & strVSLocale & ".xml"

   Set objFSO = CreateObject("Scripting.FileSystemObject")
   Set objNewVSXMLFile = objFSO.GetFile(strNewVSXMLFilePath)

   objNewVSXMLFile.Delete
End If www.yippeesoft.com

Windows Mobile 开发工具
1. Windows Mobile 2003 Second Edition 开发工具
      Windows Mobile开发分为使用本机代码和托管代码的开发,分别使用不同的开发工具:
      a. 使用本机代码是为了获得较高的性能,当您需要直接访问硬件或者资源有限的情况下使用。
      b. 使用托管代码是为了开发以用户界面为中心的应用程序,这种应用程序要求尽快面世或者要求开发速度很快。
Pocket PC 2003:
Smartphone 2003:

2. Windows Mobile 5.0 开发工具
      Visual C++ 2005环境中同时提供managed及native开发功能,将所有的开发工作将完全整合在同一环境中。Visual Studio.NET 2005默认提供了Pocket PC/Smartphone 2003 SE(第二版)的开发模板,同时将Pocket PC 2003 SE开发使用.NET CF版本升级到2.0 (beta)。
Windows Mobile 5.0 for Pocket PC:
Windows Mobile 5.0 for Smartphone:

3. 其他工具:
  除了上述基本开发工具以外,在Windows Mobile开发社区中还存在着大量的辅助工具,包括应用程序框架、工具、控件等等。其中有一些由于定位准确、制作优良、使用方便,已经成为Windows Mobile开发不可或缺的好助手。
  OpenNETCF.org Smart Device Framework

Windows Mobile 开发环境搭建
Windows Mobile 2003 Second Edition:
Windows Mobile 5.0:
  • a. 卸载所有旧版本的工具、SDK 和仿真器
    b. 安装ActiveSync3.8,如果您使用的是模拟器,还需安装Connect Emulator with ActiveSync
    c. 安装eMbedded Visual C++ 4.0 和 SP3
    d. 安装Visual Studio .NET 2003
    e. 安装PocketPC 2003 SDK或者Smartphone 2003 SDK
    f. 安装PocketPC或者Smartphone Emulator Image
标签:, , , , , , ,