VARIANT varChunk; SAFEARRAY *psa; SAFEARRAYBOUND rgsabound; |
uIsRead=f.Read(bVal,ChunkSize);//read array from a file. if(uIsRead==0)break; rgsabound[0].cElements =uIsRead; rgsabound[0].lLbound = 0; psa = SafeArrayCreate(VT_UI1,1,rgsabound); |
for(long index=0;index if(FAILED(SafeArrayPutElement(psa,&index,&bVal[index]))) ::MessageBox(NULL,"出毛病了。","提示",MB_OK │ MB_ICONWARNING); } |
varChunk.vt = VT_ARRAY│VT_UI1; varChunk.parray = psa; |
BYTE buf[lIsRead]; for(long index=0;index ::SafeArrayGetElement(varChunk.parray,&index,buf+index); } |
BYTE *buf; SafeArrayAccessData(varChunk.parray, (void **)&buf); f.Write(buf,lIsRead); SafeArrayUnaccessData(varChunk.parray); |
BYTE *buf; ::SafeArrayAccessData(psa, (void **)&buf); for(long index=0;index buf[index]=bVal[index]; } ::SafeArrayUnaccessData(psa); varChunk.vt = VT_ARRAY│VT_UI1; varChunk.parray = psa; |
// Check for whether bookmark set for a record if (VarBookmark.vt == VT_EMPTY) printf("No Bookmark set!\n"); else rst->Bookmark = VarBookmark; |
rst->Filter = _bstr_t ("姓名=''赵薇'' AND 性别=’女’"); |