ePass1000 C/C++ API Reference Manual Version 2.0 |
The epas_Write function writes data to the currently opened file at a given offset. Application need write access privilege to the file to invoke this function successfully.
EPAS_STATUS EPAS_API epas_Write( EPAS_HANDLE hContextHandle, // [in] unsigned long ulFlags, // [in] unsigned long ulOffset, // [in] unsigned char* pucBuffer, // [in] unsigned long ulBytesToWrite, // [in] unsigned long* pulBytesWritten // [out] );
epas_CreateContext, epas_OpenDevice, epas_OPenFile or epas_CreateFile
For EPAS_SYS_TYPE1 file system, this value cannot exceed size of the file. You must delete the file and then re-create it to resize it.
[out] Pointer to a variable which returns the number of bytes actually written to the file. This parameter can NOT be NULL.
Property access rights is required to write a file successfully. The granted access setting and file type is returned from the epas_OpenFile function in the EPAS_FILEINFO structure.
If the function succeeds, FT_SUCCESS returned.
If write access to the file has not granted, FT_ACCESS_DENIED returned.
For a list of all return codes, see Status Return Values.
EPAS_STATUS epsRet; EPAS_HANDLE handle; . . . unsigned long ulWritten; epsRet = epas_Write(handle,0,0,pBuf,DEMO_FILE_SIZE,&ulWritten); . . .
epas_CreateFile, epas_DeleteFile, epas_OpenFile, epas_CloseFile, epas_GetFileInfo, epas_Read, epas_CreateDir, epas_DeleteDir, epas_GetCurrentDir, epas_ChangeDir, epas_Directory