📄 366-367.html
字号:
<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=""> <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=14//-->
<!--PAGES=366-367//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="363-366.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="367-372.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>ActiveSync service providers generally implement the IReplStore and IReplObjHandler interfaces as C++ classes. In the phone list application, the desktop service providers implement these interfaces as the classes CStore and CDataHandler. On the device, the service provider also uses a class called CDataHandler to implement the IReplObjHandler interface.
</P>
<P>ActiveSync service providers are registered in the registry. The desktop provider is registered in the desktop computer registry and the device service provider in the Windows CE registry of the device on which the service provider is installed.</P>
<P>The various methods defined by the service provider interfaces are listed in Tables 14.1 and 14.2. Since this chapter cannot possibly cover every ActiveSync detail, these tables will provide a useful reference for service provider capabilities.</P>
<TABLE WIDTH="100%" BORDER RULES="ROWS"><CAPTION ALIGN=LEFT><B>Table 14.1</B> IReplStore Methods
<TR>
<TH WIDTH="30%" ALIGN="LEFT">METHOD
<TH WIDTH="70%" ALIGN="LEFT">PURPOSE
<TR>
<TD>Initialize
<TD>Called by the service manager to initialize the service provider.
<TR>
<TR>
<TD>GetStoreInfo
<TD>Retrieves information about an IReplStore instance.
<TR>
<TD>ReportStatus
<TD>Called by the service manager to get synchronization status.
<TR>
<TD>CompareStoreIDs
<TD>Compares data store identifiers.
<TR>
<TD>CompareItem
<TD>Used to compare two data store objects.
<TR>
<TD>IsItemChanged
<TD>Determines if a data store object has changed between synchronizations.
<TR>
<TD>IsItemReplicated
<TD>Determines if an object is to be synchronized.
<TR>
<TD>UpdateItem
<TD>Updates data stored in a data object handle.
<TR>
<TD>GetFolderInfo
<TD>Creates a new folder for the given object type.
<TR>
<TD VALIGN="TOP">IsFolderChanged
<TD>Determines if any object in the specified folder has changed since the method was last called.
<TR>
<TD>FindFirstItem
<TD>Called to recreate the first item in a folder during object enumeration.
<TR>
<TD>FindNextItem
<TD>Called to recreate additional folder items during enumeration.
<TR>
<TD>FindItemClose
<TD>Completes enumeration.
<TR>
<TD>ObjectToBytes
<TD>Converts a data store object to bytes for storage in REPL.DAT.
<TR>
<TD VALIGN="TOP">BytesToObject
<TD>Converts an array of bytes from REPL.DAT into the corresponding data store object.
<TR>
<TD>FreeObject
<TD>Frees the specified data store object.
<TR>
<TD>CopyObject
<TD>Copies the specified data store object.
<TR>
<TD>IsValidObject
<TD>Determines if the specified object handles are valid.
<TR>
<TD>ActivateDialog
<TD>Invokes the synchronization options dialog box.
<TR>
<TD VALIGN="TOP">GetObjTypeUIData
<TD>Retrieves information to be used about a data type in the conflict resolution dialog box and the ActiveSync status window.
<TR>
<TD VALIGN="TOP">GetConflictInfo
<TD>Retrieves information to be displayed in the conflict resolution dialog box about two conflicting objects.
<TR>
<TD>RemoveDuplicates
<TD>Removes duplicate objects from the data store.
</TABLE>
<P>
</P>
<TABLE WIDTH="100%" BORDER RULES="ROWS"><CAPTION ALIGN=LEFT><B>Table 14.2</B> IObjReplHandler Methods
<TR>
<TH WIDTH="30%" ALIGN="LEFT">METHOD
<TH WIDTH="70%" ALIGN="LEFT">PURPOSE
<TR>
<TD VALIGN="TOP">Setup
<TD>Called by the service manager to prepare the service provider to receive a data packet.
<TR>
<TD>Reset
<TD>Frees resources used during serialization or de-serialization.
<TR>
<TD>GetPacket
<TD>Converts data store objects into data packets.
<TR>
<TD>SetPacket
<TD>Converts data packets into data store objects.
<TR>
<TD>DeleteObj
<TD>Deletes a data store object.
</TABLE>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B><B>I<SMALL>NTERFACE</SMALL> I<SMALL>NSTANCES</SMALL>?</B>
<P><B>Throughout this chapter I refer to instances of COM interfaces. I am well aware that COM interfaces are not instantiated. Instead, clients create instances of components which implement COM interfaces. To prevent the discussion in this chapter from becoming more verbose than necessary, an instance of a particular COM component which implements interface IFoo is referred to as an instance of IFoo. I sometimes get even more succinct and call this component an IFoo instance.</B><HR></FONT>
</BLOCKQUOTE>
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="363-366.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="367-372.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> | <a href="/contactus.html"><font color="#006666">Contact Us</font></a> | <a href="/aboutus.html"><font color="#006666">About Us</font></a> | <a href="http://www.earthweb.com/corporate/privacy.html" target="_blank"><font color="#006666">Privacy</font></a> | <a href="http://www.itmarketer.com/" target="_blank"><font color="#006666">Ad Info</font></a> | <a href="/"><font color="#006666">Home</font></a></b>
<br><br>
Use of this site is subject to certain <a href="/agreement.html">Terms & Conditions</a>, <a href="/copyright.html">Copyright © 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 + -