|
|
|
ILockBytes Interface |
|
IID_ILockBytes |
{0000000A-0000-0000-C000-000000000046} |
|
The ILockBytes interface is implemented on a byte array object that is backed by some physical storage, such as a disk file, global memory, or a database. It is used by a COM compound file storage object to give its root storage access to the physical device, while isolating the root storage from the details of accessing the physical storage.
The ILockBytes methods are called by the COM implementations of IStorage and IStream on the compound file object. Unless you are implementing IStorage and IStream, you would not need to call ILockBytes methods directly. If you write your own ILockBytes implementation, you can use the StgCreateDocfileOnILockBytes function to create a compound file storage object backed by your implementation of ILockBytes.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
ILockBytes Methods |
Description |
|
ReadAt |
Reads a specified number of bytes starting at a specified offset from the beginning of the byte array. |
|
WriteAt |
Writes a specified number of bytes to a specified location in the byte array. |
|
Flush |
Ensures that any internal buffers maintained by the byte array object are written out to the backing storage. |
|
SetSize |
Changes the size of the byte array. |
|
LockRegion |
Restricts access to a specified range of bytes in the byte array. |
|
UnlockRegion |
Removes the access restriction on a range of bytes previously restricted with ILockBytes::LockRegion. |
|
Stat |
Retrieves a STATSTG structure for this byte array object. |
|
QueryInterface |
|
FUNCTION ILockBytes_QueryInterface ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYREF ppvObj AS DWORD _ ) AS LONG
END FUNCTION
|
|
AddRef |
|
FUNCTION ILockBytes_AddRef ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS LONG END FUNCTION
|
|
Release |
|
FUNCTION ILockBytes_Release ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS DWORD END FUNCTION
|
|
ReadAt |
|
FUNCTION ILockBytes_ReadAt ( _ BYVAL pthis AS DWORD PTR _ , BYVAL ulOffset AS QUAD _ , BYVAL pv AS DWORD _ , BYVAL cb AS DWORD _ , BYREF pcbRead AS DWORD _ ) AS LONG
LOCAL HRESULT AS LONG
|
|
WriteAt |
|
FUNCTION ILockBytes_WriteAt ( _ BYVAL pthis AS DWORD PTR _ , BYVAL ulOffset AS QUAD _ , BYVAL pv AS DWORD _ , BYVAL cb AS DWORD _ , BYREF pcbWritten AS DWORD _ ) AS
LONG
LOCAL HRESULT AS LONG
|
|
Flush |
|
FUNCTION ILockBytes_Flush ( _ BYVAL pthis AS DWORD PTR _ ) AS LONG
LOCAL HRESULT AS LONG
|
|
SetSize |
|
FUNCTION ILockBytes_SetSize ( _ BYVAL pthis AS DWORD PTR _ , BYVAL cb AS QUAD _ ) AS LONG
LOCAL HRESULT AS LONG
|
|
LockRegion |
|
FUNCTION ILockBytes_LockRegion ( _ BYVAL pthis AS DWORD PTR _ , BYVAL libOffset AS QUAD _ , BYVAL cb AS QUAD _ , BYVAL dwLockType AS DWORD _ ) AS
LONG
LOCAL HRESULT AS LONG
|
|
UnlockRegion |
|
FUNCTION ILockBytes_UnlockRegion ( _ BYVAL pthis AS DWORD PTR _ , BYVAL libOffset AS QUAD _ , BYVAL cb AS QUAD _ , BYVAL dwLockType AS DWORD _ ) AS
LONG
LOCAL HRESULT AS LONG
|
|
Stat |
|
FUNCTION ILockBytes_Stat ( _ BYVAL pthis AS DWORD PTR _ , BYREF pstatstg AS STATSTG _ , BYVAL grfStatFlag AS DWORD _ ) AS LONG
LOCAL HRESULT AS LONG
|
Page last updated on Friday, 17 March 2006 23:54:52 +0100