ActiveSync Research Update

 

我也把自己的research update一下。

现在的一个问题就是PPC上还是比较模糊,我准备先写个方便检测的tool

下面是我的操作的log蓝色字体是原版的工具log红色字体是自己的一些分析,后面附了一些代码定义,方便理解。

 

 

 

 

 

 

 

 

删除一条记录:

Id: 128, Provider: MS.WinCE.StockPor2, Interface: IReplNotify, Function: OnItemNotify(), Params: (uCode: 3, lpszProgId: MS.WinCE.StockPor2, lpszName: StockPor, hItem:  0x2334a98, ulFlags: 0), Time: 0.0000383, Return: 0 

删除纪录后,立刻就调用这个函数了。同样的问题,谁来告诉ActiveSync Manager,我删出记录了?uCode: 3 可以代码里是#define RNC_DELETED 3 lpszProgIdlpszName应该是注册表里读出来的, hItem的类型是HREPLITEM,其中包含着uid,应该是唯一的 x2334a98这个数字下面都用到了就可以代表这个Item, ulFlags:始终是0没意义

Id: 128, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x23348e0, hItem2:  0x2334a98), Time: 0.0001229, Return: -1

Id: 129, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334960, hItem2:  0x2334a98), Time: 0.0001461, Return: -1

Id: 131, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x23349a0, hItem2:  0x2334a98), Time: 0.0001528, Return: -1

Id: 132, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334760, hItem2:  0x2334a98), Time: 0.0001400, Return: 0

可以看到这里在比较,hItem2:  0x2334a98就是我删除的ItemhItem1我推测是device端的HREPLITEM,因为后面的ReportStatus0x2334760传给了PPC,前面几次都返回-1,没找到,最后一次,返回0,找到相等的 Item(uid相等)

Id: 133, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: FreeObject(), Params: (hObject:  0x2334a98), Time: 0.0001726, Return: 0

Free我删除的Object

Id: 134, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:          0), Time: 0.0021533, Return: 17

Id: 135, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:          0), Time: 0.0001475, Return: 17

Id: 136, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:          0), Time: 0.0001355, Return: 17

Id: 137, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:          0), Time: 0.0001394, Return: 17

Id: 138, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:          0), Time: 0.0001372, Return: 17

Id: 139, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:          0), Time: 0.0001467, Return: 17

Id: 140, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:          0), Time: 0.0001347, Return: 17

Id: 141, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:          0), Time: 0.0001374, Return: 17

Id: 142, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:          0), Time: 0.0001347, Return: 17

Id: 143, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334760, lpb:          0), Time: 0.0001391, Return: 17

Id: 144, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:   0xc59bce), Time: 0.0001383, Return: 17

Id: 145, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:   0xc59be9), Time: 0.0001380, Return: 17

Id: 146, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:   0xc59c04), Time: 0.0001405, Return: 17

Id: 147, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:   0xc59c1f), Time: 0.0001358, Return: 17

Id: 148, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:   0xc59c3a), Time: 0.0001361, Return: 17

Id: 149, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:   0xc59c55), Time: 0.0011309, Return: 17

Id: 150, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:   0xc59c70), Time: 0.0001352, Return: 17

Id: 151, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:   0xc59c8b), Time: 0.0001394, Return: 17

Id: 152, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:   0xc59ca6), Time: 0.0001394, Return: 17

Id: 153, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334760, lpb:   0xc59cc1), Time: 0.0001416, Return: 17

对于这里进行这么多次的ObjectToBytes,我还没想到为什么。

Id: 154, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:   0, hItem: 0, uStatus: 7, uParam: 0), Time: 0.0001145, Return: 0

uStatus: 7,代码里是RSC_REMOTE_SYNC 

Id: 155, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: IsFolderChanged(), Params: (hFolder:  0x2334728, *pfChanged: 0), Time: 0.0000497, Return: 0

Folder没有发生变化

Id: 156, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder: 0, hItem: 0, uStatus: 1, uParam: 5), Time: 0.0001411, Return: 0

uStatus:1,代码里是RSC_BEGIN_SYNC      

Id: 157, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: IsFolderChanged(), Params: (hFolder:  0x2334728, *pfChanged: 0), Time: 0.0001352, Return: 0

Folder没有发生变化

Id: 158, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:  0x2334728, hItem: 0, uStatus: 9, uParam: 12929912), Time: 0.0000989, Return: 0

Id: 159, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:  0x2334728, hItem:  0x2334760, uStatus: 19, uParam: 1307708), Time: 0.0001386, Return: 0

Id: 160, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:  0x2334728, hItem: 0, uStatus: 10, uParam: 0), Time: 0.0001377, Return: 0

Id: 161, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder: 0, hItem: 0, uStatus: 7, uParam: 0), Time: 0.0001344, Return: 0

Id: 162, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder: 0, hItem:  0, uStatus: 2, uParam: 0), Time: 0.0000497, Return: 0

从上面的ReportStatus中的uStatus代码可以猜出Activesync manager正在把删除这个事情告诉ppc,并进行了一些操作

Id: 163, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: FreeObject(), Params: (hObject:  0x2334760), Time: 0.0001648, Return: 0

把本地的对应删除的Item的映射去掉

Id: 164, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:          0), Time: 0.0001344, Return: 17

Id: 165, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:          0), Time: 0.0001425, Return: 17

Id: 166, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:          0), Time: 0.0001380, Return: 17

Id: 167, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:          0), Time: 0.0001430, Return: 17

Id: 168, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:          0), Time: 0.0001310, Return: 17

Id: 169, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:          0), Time: 0.0001444, Return: 17

Id: 170, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:          0), Time: 0.0001377, Return: 17

Id: 171, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:          0), Time: 0.0001330, Return: 17

Id: 172, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:          0), Time: 0.0001344, Return: 17

Id: 173, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:   0xc55a8e), Time: 0.0001366, Return: 17

Id: 174, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:   0xc55aa9), Time: 0.0001363, Return: 17

Id: 175, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:   0xc55ac4), Time: 0.0001349, Return: 17

Id: 176, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:   0xc55adf), Time: 0.0001436, Return: 17

Id: 177, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:   0xc55afa), Time: 0.0001374, Return: 17

Id: 178, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:   0xc55b15), Time: 0.0000992, Return: 17

Id: 179, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:   0xc55b30), Time: 0.0001299, Return: 17

Id: 180, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:   0xc55b4b), Time: 0.0001341, Return: 17

Id: 181, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:   0xc55b66), Time: 0.0001006, Return: 17

又来了好多的ObjectToBytes

Over!

 

 

添加一条记录:

Id: 232, Provider: MS.WinCE.StockPor2, Interface: IReplNotify, Function: OnItemNotify(), Params: (uCode: 2, lpszProgId: MS.WinCE.StockPor2, lpszName: StockPor, hItem:  0x23349a0, ulFlags: 0), Time: 0.0000383, Return: 0

uCode: 2 代码里是RNC_MODIFIED,其他和上面一样

Id: 232, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x23348a0, hItem2:  0x23349a0), Time: 0.0001321, Return: -1

Id: 234, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334920, hItem2:  0x23349a0), Time: 0.0001377, Return: -1

Id: 235, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334960, hItem2:  0x23349a0), Time: 0.0001374, Return: -1

Id: 236, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334960, hItem2:  0x23349a0), Time: 0.0001363, Return: -1

Id: 237, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x23348a0, hItem2:  0x23349a0), Time: 0.0001428, Return: -1

Id: 238, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334920, hItem2:  0x23349a0), Time: 0.0001433, Return: -1

Id: 239, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334960, hItem2:  0x23349a0), Time: 0.0001349, Return: -1

Id: 240, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334960, hItem2:  0x23349a0), Time: 0.0001422, Return: -1

Id: 241, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x23348a0, hItem2:  0x23349a0), Time: 0.0001405, Return: -1

Id: 242, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334920, hItem2:  0x23349a0), Time: 0.0001394, Return: -1

Id: 243, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: CompareItem(), Params: (hItem1:  0x2334960, hItem2:  0x23349a0), Time: 0.0001366, Return: -1

我觉得这里的比较是在看新创建的与已有的比较,当然不可能有一样的,所有都返回-1,但数据库里只有9条记录,我不知道为什么比较了10次。

Id: 244, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: IsItemReplicated(), Params: (hFolder:  0x2334728, hItem:  0x23349a0), Time: 0.0001754, Return: 1

check if pItem should be replicated using information stored both in pFolder & pItem

Id: 245, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:          0), Time: 0.0001414, Return: 17

Id: 246, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:          0), Time: 0.0001419, Return: 17

Id: 247, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:          0), Time: 0.0001408, Return: 17

Id: 248, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:          0), Time: 0.0001383, Return: 17

Id: 249, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:          0), Time: 0.0001405, Return: 17

Id: 250, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:          0), Time: 0.0001562, Return: 17

Id: 251, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:          0), Time: 0.0001430, Return: 17

Id: 252, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:          0), Time: 0.0001408, Return: 17

Id: 253, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:          0), Time: 0.0001458, Return: 17

Id: 254, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:   0xc55a8e), Time: 0.0001358, Return: 17

Id: 255, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:   0xc55aa9), Time: 0.0001067, Return: 17

Id: 256, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:   0xc55ac4), Time: 0.0001514, Return: 17

Id: 257, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:   0xc55adf), Time: 0.0001467, Return: 17

Id: 258, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:   0xc55afa), Time: 0.0001422, Return: 17

Id: 259, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:   0xc55b15), Time: 0.0001447, Return: 17

Id: 260, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:   0xc55b30), Time: 0.0001383, Return: 17

Id: 261, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:   0xc55b4b), Time: 0.0001416, Return: 17

Id: 262, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:   0xc55b66), Time: 0.0001363, Return: 17

这里的次数与预料的也差1,我可能疏忽了什么

Id: 263, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder: 0, hItem: 0, uStatus: 7, uParam: 0), Time: 0.0001190, Return: 0

Id: 264, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: IsFolderChanged(), Params: (hFolder:  0x2334728, *pfChanged: 0), Time: 0.0000486, Return: 0

Id: 265, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder: 0, hItem: 0, uStatus: 1, uParam: 5), Time: 0.0001319, Return: 0

Id: 266, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: IsFolderChanged(), Params: (hFolder:  0x2334728, *pfChanged: 0), Time: 0.0001442, Return: 0

Id: 267, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:  0x2334728, hItem:          0, uStatus: 9, uParam: 12929960), Time: 0.0001668, Return: 0

Id: 268, Provider: MS.WinCE.StockPor2, Interface: IReplObjHandler, Function: Setup(), Params: (pSetup:   0xc5a4b4), Time: 0.0002081, Return: 0

Id: 269, Provider: MS.WinCE.StockPor2, Interface: IReplObjHandler, Function: GetPacket(), Params: (*lppbPacket: 0, *pcbPacket: 0, cbRecommend: 8192), Time: 0.0252127, Return: 1310721

Id: 270, Provider: MS.WinCE.StockPor2, Interface: IReplObjHandler, Function: Reset(), Params: (pSetup:   0xc5a4b4), Time: 0.0001461, Return: 0

Id: 271, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:  0x2334728, hItem:  0x23349a0, uStatus: 18, uParam: 1307708), Time: 0.0001115, Return: 0

Id: 272, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: IsItemChanged(), Params: (hFolder:  0x2334728, hItem:  0x23349a0, hItemComp:          0), Time: 0.0001780, Return: 0

Id: 273, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:  0x2334728, hItem:          0, uStatus: 10, uParam: 0), Time: 0.0001374, Return: 0

Id: 274, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:          0, hItem:          0, uStatus: 7, uParam: 0), Time: 0.0001349, Return: 0

Id: 275, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ReportStatus(), Params: (hFolder:          0, hItem:          0, uStatus: 2, uParam: 0), Time: 0.0000506, Return: 0

这里ReportStatus过程与上面类似,不同在于,本机添加了的纪录,需要传到ppc那边去,所以多了Setup(),GetPacket(),IsItemChanged()

Id: 276, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:          0), Time: 0.0001380, Return: 17

Id: 277, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:          0), Time: 0.0001433, Return: 17

Id: 278, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:          0), Time: 0.0001372, Return: 17

Id: 279, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:          0), Time: 0.0001408, Return: 17

Id: 280, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:          0), Time: 0.0001394, Return: 17

Id: 281, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:          0), Time: 0.0001450, Return: 17

Id: 282, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:          0), Time: 0.0001442, Return: 17

Id: 283, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:          0), Time: 0.0001416, Return: 17

Id: 284, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:          0), Time: 0.0001419, Return: 17

Id: 285, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23349a0, lpb:   0xc55a8e), Time: 0.0001439, Return: 17

Id: 286, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334960, lpb:   0xc55aa9), Time: 0.0001207, Return: 17

Id: 287, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334920, lpb:   0xc55ac4), Time: 0.0001394, Return: 17

Id: 288, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348e0, lpb:   0xc55adf), Time: 0.0001559, Return: 17

Id: 289, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23348a0, lpb:   0xc55afa), Time: 0.0001349, Return: 17

Id: 290, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334860, lpb:   0xc55b15), Time: 0.0001341, Return: 17

Id: 291, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x2334820, lpb:   0xc55b30), Time: 0.0001439, Return: 17

Id: 292, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347e0, lpb:   0xc55b4b), Time: 0.0001402, Return: 17

Id: 293, Provider: MS.WinCE.StockPor2, Interface: IReplStore, Function: ObjectToBytes(), Params: (hObject:  0x23347a0, lpb:   0xc55b66), Time: 0.0001400, Return: 17

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

Total Time: 0.0500829 secs

Total Calls: 166

 

把数据库里的数据库删除到只有1条,并把partnership删除,从开始来log

 

建立PartnerShip

 

 

Summary:

         通过使用SyncMon工具,对PC端的ActiveSync ManagerSerivce Provider的调用有了一定的理解。

 

PS:

OnItemNotify----uCode

#define RNC_CREATED     1

#define RNC_MODIFIED    2

#define RNC_DELETED     3

#define RNC_SHUTDOWN    4

#define RNC_IDLE        5

 

// Code for ReportStatus

#define RSC_BEGIN_SYNC          ((UINT)1)   // Synchronization is about to start, uReserved is combination of bit flags, see BSF_* above

#define RSC_END_SYNC            ((UINT)2)   // Synchronization is about to end

#define RSC_BEGIN_CHECK         ((UINT)3)   // FindFirstItem is about to be called, followed by FindNextItem

#define RSC_END_CHECK           ((UINT)4)   // FindItemClose has been called

#define RSC_DATE_CHANGED        ((UINT)5)   // System Date has changed, this is called for each known desktop object, unless when both hFolder & hItem are NULL

#define RSC_RELEASE             ((UINT)6)   // Replication is about to release the store

#define RSC_REMOTE_SYNC         ((UINT)7)   // Indicates if remote sync is enabled. uParam will TRUE if all sync

                                            // will be remote until this status is reported again with uParam set to FALSE

#define RSC_INTERRUPT           ((UINT)8)   // interrupt current operation

OnItemNotify     ((UINT)9)   // Synchronization is about to start on an object type. uReserved points to

#define RSC_END_SYNC_OBJ        ((UINT)10)  // Synchronization is about to end on an object type.

#define RSC_OBJ_TYPE_ENABLED    ((UINT)11)  // Synchronization of the given object is enabled, hFolder is indeed a pointer to a string (object type name)

#define RSC_OBJ_TYPE_DISABLED   ((UINT)12)  // Synchronization of the given object is disabled, hFolder is indeed a pointer to a string (object type name)

#define RSC_BEGIN_BATCH_WRITE   ((UINT)13)  // A series of SetPacket will be called on a number of objects, this is the right time for some service providers to start a transaction

#define RSC_END_BATCH_WRITE     ((UINT)14)  // above write ends, this is the right time for some service providers to commit the transaction

#define RSC_CONNECTION_CHG      ((UINT)15)  // connection status has changed. uParam is TRUE if connection established. FALSE otherwise.

#define RSC_WRITE_OBJ_FAILED    ((UINT)16)  // failed writing an object on the device. uParam is the HRESULT code.

#define RSC_DELETE_OBJ_FAILED   ((UINT)17)  // failed deleting an object on the device. uParam is the HRESULT code.

#define RSC_WRITE_OBJ_SUCCESS   ((UINT)18)  // writing of an object succeeded on the device. uParam is a pointer to SDREQUEST (with (lpbData, cbData) representing the volume ID)

#define RSC_DELETE_OBJ_SUCCESS  ((UINT)19)  // deletion of an object succeeded on the device. uParam is a pointer to SDREQUEST (with (lpbData, cbData) representing the volume ID)

#define RSC_READ_OBJ_FAILED     ((UINT)20)  // failed to read an object from the device. uParam is the HRESULT code

#define RSC_TIME_CHANGED        ((UINT)21)  // System time has changed, this is called only once.

 

#define RSC_BEGIN_BACKUP        ((UINT)22)  // Backup is about to start.

#define RSC_END_BACKUP          ((UINT)23)  // Backup has ended.

#define RSC_BEGIN_RESTORE       ((UINT)24)  // Restore is about to start.

 

#define RSC_PREPARE_SYNC_FLD    ((UINT)26)  // Prepare to sync one specific folder whether or not any objects of the type are dirty. hFolder is a pointer to the object name that will be synced.

 

Thanks

-Song Lei

Intern in GTSC-China DSWL

 

你可能感兴趣的:(update)