CeStreamSetSize (EDB) (Windows CE 5.0)
This function is used to set the size of data in a stream.
This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.
BOOL CeStreamSetSize(HANDLEhStream,DWORDcbSize);
Parameters
- hStream
[in] A handle to the stream object. The handle is obtained by using the CeOpenStream (EDB) function. - cbSize
[in] The new size of the stream.
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists possible values returned by GetLastError:
Return Value | Description |
---|---|
ERROR_INVALID_HANDLE | Indicates that hStream is NULL or equal to INVALID_HANDLE_VALUE. |
ERROR_ACCESS_DENIED | Indicates that the stream was not opened with GENERIC_WRITE. |
ERROR_NO_MORE_ITEMS | Indicates that the database from which the stream object was opened had its current row seek position changed. To prevent this, you should open a stream, perform the operations, and then close the stream before doing anything else on the parent database. |
Remarks
To set the size of a stream, you must have specified the GENERIC_WRITE flag when opening the stream using the CeOpenStream function. The size that is set is based on the entire stream, and is not relative to the current seek position.
The stream is increased or truncated as required.
To save the changes that are made to a stream using this function, you must call the CeStreamSaveChanges (EDB) function.
Requirements
OS Versions: Windows CE 5.0 and later.
Header: Windbase.h.
Link Library: Coredll.lib.
See Also
CeOpenStream (EDB) | CeStreamSaveChanges (EDB)
Send Feedback on this topic to the authors