⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 147-153.html

📁 WindowsCE.[Essential Windows CE Application Programming].Jon Wiley & Son.zip
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!-- PUB PARTNERS END -->
<!-- END LEFT NAV -->

<td rowspan="8" align="right" valign="top"><img src="/images/iswbls.gif" width=1 height=400 alt="" border="0"></td>
<td><img src="/images/white.gif" width="5" height="1" alt="" border="0"></td>
<!-- end of ITK left NAV -->

<!-- begin main content -->
<td width="100%" valign="top" align="left">


<!-- END SUB HEADER -->

<!--Begin Content Column -->

<FONT FACE="Arial,Helvetica" SIZE="-1">
To access the contents, click the chapter and section titles.
</FONT>
<P>
<B>Essential Windows CE Application Programming</B>
<FONT SIZE="-1">
<BR>
<I>(Publisher: John Wiley & Sons, Inc.)</I>
<BR>
Author(s): Robert Burdick
<BR>
ISBN: 0471327476
<BR>
Publication Date: 03/01/99
</FONT>
<P>
<form name="Search" method="GET" action="http://search.earthweb.com/search97/search_redir.cgi">

<INPUT TYPE="hidden" NAME="Action" VALUE="Search">
<INPUT TYPE="hidden" NAME="SearchPage" VALUE="http://search.earthweb.com/search97/samples/forms/srchdemo.htm">
<INPUT TYPE="hidden" NAME="Collection" VALUE="ITK">
<INPUT TYPE="hidden" NAME="ResultTemplate" VALUE="itk-simple-intrabook.hts">
<INPUT TYPE="hidden" NAME="ViewTemplate" VALUE="view.hts">

<font face="arial, helvetica" size=2><b>Search this book:</b></font><br>
<INPUT NAME="queryText" size=50 VALUE="">&nbsp;<input type="submit" name="submitbutton" value="Go!">
<INPUT type=hidden NAME="section_on" VALUE="on">
<INPUT type=hidden NAME="section" VALUE="http://www.itknowledge.com/reference/standard/0471327476/">

</form>


<!-- Empty Reference Subhead -->

<!--ISBN=0471327476//-->
<!--TITLE=Essential Windows CE Application Programming//-->
<!--AUTHOR=Robert Burdick//-->
<!--PUBLISHER=John Wiley & Sons, Inc.//-->
<!--IMPRINT=Wiley Computer Publishing//-->
<!--CHAPTER=6//-->
<!--PAGES=147-153//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="145-147.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="153-159.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B>The CEFILEINFO Structure</B></FONT></P>
<P>CEFILEINFO structures are used to describe files in the object store:
</P>
<!-- CODE SNIP //-->
<PRE>
  typedef struct _CEFILEINFO
  &#123;
    DWORD dwAttributes;
    CEOID oidParent;
    WCHAR szFileName[MAX_PATH];
    FILETIME ftLastChanged;
    DWORD dwLength;
  &#125; CEFILEINFO;
</PRE>
<!-- END CODE SNIP //-->
<P><I>dwAttributes</I> contains the attributes of the file. <I>oidParent</I> is the object identifier of the file&#146;s parent directory. If NULL, the file is at the top level of the file system. <I>oidParent</I> can be passed to a subsequent call of <I>CeOidGetInfo</I> to get information about a file&#146;s parent directory. <I>szFileName</I> is a null-terminated Unicode string containing the full path and file name of the file. <I>ftLastChanged</I> indicates when the file was last modified, and <I>dwLength</I> gives the length of the file in bytes.</P>
<P><FONT SIZE="+1"><B>The CEDIRINFO Structure</B></FONT></P>
<P>Directories are described with CEDIRINFO:
</P>
<!-- CODE SNIP //-->
<PRE>
  typedef struct _CEDIRINFO
  &#123;
    DWORD dwAttributes;
    CEOID oidParent;
    WCHAR szDirName[MAX_PATH];
  &#125; CEDIRINFO;
</PRE>
<!-- END CODE SNIP //-->
<P><I>dwAttributes</I> contains the attributes of the directory. <I>oidParent</I> is the object identifier of this directory&#146;s parent. If NULL, the directory is in the root directory of the file system. <I>szDirName</I> contains the full path name of the directory.</P>
<P><FONT SIZE="+1"><B>The CERECORDINFO and CEDBASEINFO Structures</B></FONT></P>
<P>The CERECORDINFO structure contains information about a particular Windows CE database record:
</P>
<!-- CODE SNIP //-->
<PRE>
  typedef struct _CERECORDINFO
  &#123;
    CEOID oidParent;
  &#125; CERECORDINFO;
</PRE>
<!-- END CODE SNIP //-->
<P>This structure contains only one member, <I>oidParent</I>. <I>oidParent</I> contains the object identifier of the Windows CE database to which this record belongs.</P>
<P>A CEDBASEINFO structure contains details of a Windows CE database object. This structure will be defined and discussed in detail in the Chapter 7.</P>
<H3><A NAME="Heading3"></A><FONT COLOR="#000077">Viewing the Windows CE Object Store</FONT></H3>
<P>The Windows CE Toolkit provides a tool for visually examining the object store on either a Windows CE device or the Windows CE emulator. To invoke it, select the Remote Object Viewer options from the Tools menu in Microsoft Developer Studio. The dialog box shown in Figure II.1 will appear.
</P>
<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/06-01.jpg',356,131 )"><IMG SRC="images/06-01t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/06-01.jpg',356,131)"><FONT COLOR="#000077"><B>Figure II.1</B></FONT></A>&nbsp;&nbsp;Connecting to the Remove Object Viewer.</P>
<P>If you have a Window CE device connected to your PC, the Remote Object Viewer will connect to it and display the object store on the device. Otherwise, to view the emulator&#146;s object store, press the abort button.
</P>
<P>The Remote Object Viewer works much like the Windows NT Explorer. It contains a tree view user interface that allows you to browse the hierarchy of files on the drives attached to the Windows NT machine on which you are running the Remote Object Viewer.</P>
<P>For example, in Figure II.2 you can see a root item in the tree labeled C:Drive. Expanding this node would display all of the directories on my C: drive.</P>
<P><A NAME="Fig2"></A><A HREF="javascript:displayWindow('images/06-02.jpg',557,351 )"><IMG SRC="images/06-02t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/06-02.jpg',557,351)"><FONT COLOR="#000077"><B>Figure II.2</B></FONT></A>&nbsp;&nbsp;The Remote Object Viewer.</P>
<P>More interesting, however, is that the Remote Object Viewer allows you to browse both the Windows CE file system and all of the databases contained in the object store. This tool is very useful for quickly creating folders, moving and deleting files, or viewing database records.
</P>
<P>In Figure II.2, the Emulator Database tree view item contains all of the databases currently stored by the Windows CE emulation object store. Similarly, the Emulator Files item contains the hierarchy of directories and files in the emulation file system. If the host Windows NT PC were connected to a Windows CE device such as a handheld PC or a palm-size PC, the Remote Object Viewer would instead show the databases and file system on that device.</P>
<P>Using the Remote Object Viewer is very much like using the Windows NT Explorer. You can view the contents of directories by expanding the corresponding folder icon. Menu options allow you to rename and delete files or folders. You can also create new folders. You can change the way the contents are displayed with the various View menu options.</P>
<P>The Remote Object Viewer also allows you to transfer files between your desktop computer and the Windows CE emulation environment. If your computer is connected to an actual Windows CE device, you can also transfer files between the computer and the device. As with the Windows NT Explorer, simply drag the icon representing the file to be transferred to the folder where you wish the file to reside.</P>
<P>For databases, the Remote Object Viewer allows you to look at all of the records in a particular database. For example, Figure II.3 shows the contents of the phone list database associated with an application we will see in Chapter 7. Each item in the right-hand pane of the Remote Object Viewer is a database record labeled with its unique CEOID object identifier.</P>
<P><A NAME="Fig3"></A><A HREF="javascript:displayWindow('images/06-03.jpg',540,333 )"><IMG SRC="images/06-03t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/06-03.jpg',540,333)"><FONT COLOR="#000077"><B>Figure II.3</B></FONT></A>&nbsp;&nbsp;Browsing the contents of the phone list database with the Remote Object Viewer.</P>
<P>If you select an individual database record in the right-hand pane and then select the Properties option from the File menu, the window in Figure II.4 is displayed. This window details the contents of the selected database record. It displays the record property data types and values. The subjects of Windows CE database records, record properties, and the like are covered in detail in Chapter 7.
</P>
<P><A NAME="Fig4"></A><A HREF="javascript:displayWindow('images/06-04.jpg',404,145 )"><IMG SRC="images/06-04t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/06-04.jpg',404,145)"><FONT COLOR="#000077"><B>Figure II.4</B></FONT></A>&nbsp;&nbsp;A look at the properties of a phone list database record.<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="145-147.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="153-159.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>


<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->

<!-- BEGIN SUB FOOTER -->
		<br><br>
		</TD>
    </TR>
	</TABLE>

		
	<table width="640" border=0 cellpadding=0 cellspacing=0>
		<tr>
		<td align="left" width=135><img src="/images/white.gif" width=100 height="1" alt="" border="0"></td>
		
		
<!-- END SUB FOOTER -->

<!-- all of the books have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->

<!-- FOOTER -->
			
		<td width="515" align="left" bgcolor="#FFFFFF">
<font face="arial, helvetica" size="1"><b><a href="/products.html"><font color="#006666">Products</font></a>&nbsp;|&nbsp; <a href="/contactus.html"><font color="#006666">Contact Us</font></a>&nbsp;|&nbsp; <a href="/aboutus.html"><font color="#006666">About Us</font></a>&nbsp;|&nbsp; <a href="http://www.earthweb.com/corporate/privacy.html" target="_blank"><font color="#006666">Privacy</font></a> &nbsp;|&nbsp; <a href="http://www.itmarketer.com/" target="_blank"><font color="#006666">Ad Info</font></a> &nbsp;|&nbsp; <a href="/"><font color="#006666">Home</font></a></b>
		<br><br>
		
		Use of this site is subject to certain <a href="/agreement.html">Terms &amp; Conditions</a>, <a href="/copyright.html">Copyright &copy; 1996-1999 EarthWeb Inc.</a><br> 
All rights reserved.  Reproduction whole or in part in any form or medium without express written permision of EarthWeb is prohibited.</font><p>
</td>
		</tr>
</table>
</BODY>
</HTML>

<!-- END FOOTER -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -