Home COM GDI+ WebBrowser Data Access

IPersistStreamInit Interface

 

IID_IPersistStreamInit

{7FD52380-4E07-101B-AE2D-08002B2EC713}

 

 

The IPersistStreamInit interface is defined as a replacement for IPersistStream in order to add an initialization method, InitNew. This interface is not derived from IPersistStream; it is mutually exclusive with IPersistStream. An object chooses to support only one of the two interfaces, based on whether it requires the InitNew method. Otherwise, the signatures and semantics of the other methods are the same as the corresponding methods of IPersistStream, except as described below.

 

Use this interface to initialize a stream-based object and to save that object to a stream.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IPersist Method

Description

GetClassID

Returns the class identifier (CLSID) for the component object.

IPersistStream Methods

Description

IsDirty

Checks the object for changes since it was last saved.

Load

Initializes an object from the stream where it was previously saved.

Save

Saves an object into the specified stream and indicates whether the object should reset its dirty flag.

GetSizeMax

Return the size in bytes of the stream needed to save the object.

IPersistStreamInit Method

Description

InitNew

Initializes the object to a default state.

 

IsDirty

 

FUNCTION IPersistStreamInit_IsDirty ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IPersistStreamInit_IsDirty (pthis) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IPersistStreamInit_IsDirty ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+16]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

Load

 

FUNCTION IPersistStreamInit_Load ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pStm AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IPersistStreamInit_Load (pthis, pStm) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IPersistStreamInit_Load ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pStm AS DWORD _

  ) AS LONG
 

  ! push pStm

  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+20]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

Save

 

FUNCTION IPersistStreamInit_Save ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pStm AS DWORD _

, BYVAL fClearDirty AS LONG _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IPersistStreamInit_Save (pthis, pStm, fClearDirty) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IPersistStreamInit_Save ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pStm AS DWORD _

, BYVAL fClearDirty AS LONG _

  ) AS LONG
 

  ! push fClearDirty

  ! push pStm
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+24]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

GetSizeMax

 

FUNCTION IPersistStreamInit_GetSizeMax ( _

  BYVAL pthis AS DWORD PTR _

, BYREF pcbSize AS QUAD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IPersistStreamInit_GetSizeMax (pthis, pcbSize) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IPersistStreamInit_GetSizeMax ( _

  BYVAL pthis AS DWORD PTR _

, BYREF pcbSize AS QUAD _

  ) AS LONG
 

  ! push pcbSize
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+28]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

InitNew

 

FUNCTION IPersistStreamInit_InitNew ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[8] USING IPersistStreamInit_InitNew (pthis) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IPersistStreamInit_InitNew ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+32]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

Page last updated on Sunday, 26 March 2006 19:05:09 +0100