惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
Engineering at Meta
Engineering at Meta
I
InfoQ
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 【当耐特】
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
腾讯CDC
雷峰网
雷峰网
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
D
Docker

博客园 - 转角遇到你

SQL安装问题:SQL Redist ANSI 和 UNICODE 的函数对应表【转】 wchar_t*,wchar_t,wchat_t数组,char,char*,char数组,std::string,std::wstring,CString转自由骑士大哥 [转]宽字符处理函数函数与普通函数对照表 cad pk Microstation LPCTSTR类型 UNICODE下宽字符的CString转换为const char * Windows应用程序中几种特殊鼠标事件的识别【转】 在C++ 程序中调用被C 编译器编译后的函数,为什么要加extern “C”?----转 [转] #ifndef#define#endif的用法(整理) cximage用的过程中的错误 【转】三维形体模型的表示 AutoCAD的坐标系 AutoCAD数据库小记 两个不同的类相互引用的情况下头文件包含问题 ctabctrl insertitem 报Debug Assertion Failed com基于mfc和非mfc的区别 error LNK2001: unresolved external symbol __endthreadex 最小二乘法
arx 打开实体对象方式
转角遇到你 · 2008-03-06 · via 博客园 - 转角遇到你

一个对象可以用下面三种模式打开:
kForRead. An object can be opened for read by up to 256 readers as long as the object is not already open for write or for notify.
kForWrite. An object can be opened for write if it is not already open. Otherwise, the open fails.
kForNotify. An object can be opened for notification when the object is closed, open for read, or open for write, but not when it is already open for notify. See chapter 16, Notification. Applications will rarely need to open an object for notify and send it notification.

如果你要用写方式打开一个对象时返回eWasOpenForRead错误,你可以用upgradeOpen()函数使其从只读方式转换为写方式。同样你可以用downgradeOpen()函数转换为只读模式。如果对象被以修改模式打开,可以用upgradeFromNotify() 转换为写方式,用downgradeToNotify()转换为修改方式。

我在读取db的时候,一般用kForNotify,这样文件在被打开的状态下也可以进行编辑。