Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ILockBytes::Stat method

The Stat method retrieves a STATSTG structure containing information for this byte array object.

Syntax


HRESULT Stat(
  [out] STATSTG *pstatstg,
  [in]  DWORD   grfStatFlag
);

Parameters

pstatstg [out]

Pointer to a STATSTG structure in which this method places information about this byte array object. The pointer is NULL if an error occurs.

grfStatFlag [in]

Specifies whether this method should supply the pwcsName member of the STATSTG structure through values taken from the STATFLAG enumeration. If the STATFLAG_NONAME is specified, the pwcsName member of STATSTG is not supplied, thus saving a memory-allocation operation. The other possible value, STATFLAG_DEFAULT, indicates that all members of the STATSTG structure be supplied.

Return value

This method can return one of these values.

S_OK

The STATSTG structure was successfully returned at the specified location.

E_OUTOFMEMORY

The STATSTG structure was not returned due to a lack of memory for the name member in the structure.

STG_E_ACCESSDENIED

The STATSTG structure was not returned because the caller did not have access to the byte array.

STG_E_INSUFFICIENTMEMORY

The STATSTG structure was not returned, due to insufficient memory.

STG_E_INVALIDFLAG

The value for the grfStateFlag parameter is not valid.

STG_E_INVALIDPOINTER

The value for the pStatStg parameter is not valid.

Remarks

ILockBytes::Stat should supply information about the byte array object in a STATSTG structure.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Objidl.h

IDL

Objidl.idl

Library

Uuid.lib

DLL

Ole32.dll

IID

IID_ILockBytes is defined as 0000000A-0000-0000-C000-000000000046

See also

STATFLAG
STATSTG
ILockBytes - File-Based Implementation
ILockBytes - Global Memory Implementation

 

 

Show:
© 2017 Microsoft