上面这个函数我尝试去打开一个database,如果不存在,则创建一个.
但是在编译时却返回如下错误:
.\AlbumDB.cpp(44) : error C4995: 'CeOpenDatabase': name was marked as #pragma deprecated
.\AlbumDB.cpp(62) : error C4995: 'CeCreateDatabase': name was marked as #pragma deprecated
.\AlbumDB.cpp(75) : error C4995: 'CeOpenDatabase': name was marked as #pragma deprecated
实在弄不清楚为什么?
(2)
static LPARAM DoMainCommandEdit(HWND hWnd, WORD idItem, HWND hwndCtl, WORD wNotifyCode)
{
PCEPROPVAL pcepv = 0;
int nSel, rc;
WORD wProps = 0;
DWORD dwRecSize, dwIndex;
CEOID oid;
但是第二个问题仍然存在
我查了windows mobile 6 sdk关于CeReadRecordProps()函数的说明:
lplpBuffer
[out] Pointer to a long pointer to a buffer that receives the requested properties. If the dwFlags parameter includes the CEDB_ALLOWREALLOC flag, the buffer may be reallocated if necessary. If the CEDB_ALLOWREALLOC flag is specified and this parameter is NULL, the server uses the LocalAlloc function to allocate a buffer of the appropriate size in the caller's address space and returns a pointer to the buffer. Note that if the CEDB_ALLOWREALLOC flag is specified, it is possible for the value of this pointer to change even on failure. For example, the old memory might be freed and the allocation might then fail, leaving the pointer set to NULL.