I am tring to open some EDB databases... and to get the corect name using CeGetDBInformationByHandle.
My code looks like this:
 *hSession = iCeCreateSession(pGuid);
 if(*hSession==NULL)
 return INVALID_HANDLE_VALUE; 
 if( (hwnDB=iCeOpenDatabaseInSession(*hSession,pGuid,poid,pwszName,pSort,dwFlags,pRequest)==INVALID_HANDLE_VALUE)
 {
 DisplayMessage(GetLastError());
 return;
 }
 // DB open
 BY_HANDLE_DB_INFORMATION lpDBInfo ;
 lpDBInfo.wVersion = 2;// version for EDB
 if(!CeGetDBInformationByHandle(hwnDB, &lpDBInfo)) 
 {
 DisplayMessage(GetLastError()); // HERE I get sometimes error code 87 (The parameter is incorrect.)
 return;
 }
 if(lpDBInfo.infDatabase.dwFlags |= CEDB_VALIDNAME)
 DisplayMessage(lpDBInfo.infDatabase.szDbaseName);
Could anyone tell me why this is happening ? 
Best regards.
I tried this, it works fine for me. Do you have the steps to reproduce this?
 
No comments:
Post a Comment