共用方式為


IStorage::SetStateBits

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method stores up to 32 bits of state information in this storage object.

Syntax

HRESULT SetStateBits( 
  DWORD grfStateBits, 
  DWORD grfMask 
);

Parameters

  • grfStateBits
    [in] New values of the bits to set.

    No legal values are defined for these bits. They are all reserved for future use and must not be used by applications.

  • grfMask
    [in] Binary mask that indicates which bits in grfStateBits are significant in this call.

Return Value

The following table shows the return values for this method.

Value Description

S_OK

The state informationwas successfully set.

E_PENDING

Asynchronous Storage only: Part or all of the storage's data is currently unavailable.

For more information see the IFillLockBytes interface and Asynchronous Storage.

STG_E_ACCESSDENIED

The caller does not have sufficient permissions for changing this storage object.

STG_E_INVALIDFLAG

The value for the grfStateBits or grfMask parameters are not valid.

STG_E_INVALIDPARAMETER

One of the parameters was invalid.

Remarks

This interface is reserved for future use. The values for the state bits are not currently defined.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header objidl.h, objidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later