CeSeekDatabaseEx 总是返回0

wangjiwei8712 2009-02-19 06:55:09

CEOID CeOID = CeSeekDatabaseEx(m_hHandle,CEDB_SEEK_CURRENT,0,0,&dwCurrIndex);
CeSeekDatabaseEx 总是返回0
DWORD error = GetLastError();
得到的错误为:值25,The drive cannot locate a specific area or track on the disk. ERROR_SEEK

请问,这个是怎么造成的.怎么解决
...全文
131 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zpk1234 2009-03-02
  • 打赏
  • 举报
回复
CEOID CCeDBDatabaseEx::GetCurrRecord()
{
AssertValid();

DWORD dwCurrIndex;
CEOID CeOID = CeSeekDatabaseEx(m_hHandle,CEDB_SEEK_CURRENT,1,0,&dwCurrIndex);
if (CeOID)
{
CeOID = CeSeekDatabaseEx(m_hHandle,CEDB_SEEK_CURRENT,-1,0,&dwCurrIndex);
return CeOID;
}
else
//CEDB_SEEK_END dwValue为正
CeOID = CeSeekDatabaseEx(m_hHandle,CEDB_SEEK_END,0,0,&dwCurrIndex);
//ERROR_SEEK ---The seek operation did not find the specified row.
DWORD error = GetLastError();
return CeOID;
}
zpk1234 2009-03-02
  • 打赏
  • 举报
回复
不要跟CeSeekDatabaseEx一起用
wangjiwei8712 2009-02-20
  • 打赏
  • 举报
回复
句柄是有效的。
看了下msdn 可能是CeWriteRecordProps (EDB)出问题了。
However, the position of that record in the sort order may change if its sort properties are included in those properties that are modified. Therefore, using this function in conjunction with the CeSeekDatabaseEx (EDB) function may result in unexpected seek behavior.

儿大不由爷 2009-02-19
  • 打赏
  • 举报
回复
句柄是有效的么

19,502

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧