Home COM GDI+ WebBrowser Data Access

ITargetFrame2 Interface

 

IID_ITargetFrame2

{86D52E11-94A8-11d0-82AF-00C04FD5AE38}

 

 

This interface provides methods for retrieving and setting frame data.
 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

ITargetFrame2 Methods

Description

SetFrameName

Sets the name of the frame.

GetFrameName

Retrieves the name of the frame.

GetParentFrame

Retrieves the parent of the frame.

SetFrameSrc

Sets the URL to load into the frame.

GetFrameSrc

Retrieves the URL to load into the frame.

GetFramesContainer

Retrieves a container object for the frames.

SerFrameOptions

Sets the options for the frame.

GetFrameOptions

Retrieves the options that are set for the frame.

SetFrameMargins

Sets the margins of the frame.

GetFrameMargins

Retrieves the margins of the frame.

FindFrame

Searches for a particular frame.

GetTargetAlias

Retrieves the alias of the target frame.

 

SetFrameName

 

FUNCTION ITargetFrame2_SetFrameName ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strFrameName AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG

  strFrameName = UCODE$(strFrameName) & $NUL
  CALL DWORD @@pthis[3] USING ITargetFrame2_SetFrameName (pthis, strFrameName) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetFrameName

 

FUNCTION Proto_ITargetFrame2_GetFrameName ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppszFrameName AS DWORD _
  ) AS LONG
 

FUNCTION ITargetFrame2_GetFrameName ( _
  BYVAL pthis AS DWORD PTR _
, BYREF strFrameName AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG
  LOCAL bstrlen AS LONG

  LOCAL ppszFrameName AS DWORD
  CALL DWORD @@pthis[4] USING Proto_ITargetFrame2_GetFrameName (pthis, ppszFrameName) TO HRESULT
  IF ISTRUE ppszFrameName THEN
     bstrlen = lstrlenW(BYVAL ppszFrameName)
     IF ISTRUE bstrlen THEN
        strFrameName = PEEK$(ppszFrameName, bstrlen * 2)
        strFrameName = ACODE$(strFrameName)
     END IF
     CoTaskMemFree ppszFrameName
  END IF
  FUNCTION = HRESULT

END FUNCTION

 

 

GetParentFrame

 

FUNCTION ITargetFrame2_GetParentFrame ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppunkParent AS DWORD _
  ) AS LONG

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

END FUNCTION

 

 

SetFrameSrc

 

FUNCTION ITargetFrame2_SetFrameSrc ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strFrameSrc AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG
  strFrameSrc = UCODE$(strFrameSrc) & $NUL
  CALL DWORD @@pthis[6] USING ITargetFrame2_SetFrameSrc (pthis, strFrameSrc) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetFrameSrc

 

FUNCTION Proto_ITargetFrame2_GetFrameSrc ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppszFrameSrc AS DWORD _
  ) AS LONG
 

FUNCTION ITargetFrame2_GetFrameSrc ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppszFrameSrc AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  LOCAL bstrlen AS LONG

  LOCAL ppszFrameSrc AS DWORD
  CALL DWORD @@pthis[7] USING Proto_ITargetFrame2_GetFrameSrc (pthis, ppszFrameSrc) TO HRESULT
  IF ISTRUE ppszFrameSrc THEN
     bstrlen = lstrlenW(BYVAL ppszFrameSrc)
     IF ISTRUE bstrlen THEN
        strFrameSrc = PEEK$(ppszFrameSrc, bstrlen * 2)
        strFrameSrc = ACODE$(strFrameSrc)
     END IF
     CoTaskMemFree ppszFrameSrc
  END IF
  FUNCTION = HRESULT

END FUNCTION

 

 

GetFramesContainer

 

FUNCTION ITargetFrame2_GetFramesContainer ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppContainer AS DWORD _
  ) AS LONG

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

END FUNCTION

 

 

SetFrameOptions

 

FUNCTION ITargetFrame2_SetFrameOptions ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL dwFlags AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[9] USING ITargetFrame2_SetFrameOptions (pthis, dwFlags) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetFrameOptions

 

FUNCTION ITargetFrame2_GetFrameOptions ( _
  BYVAL pthis AS DWORD PTR _
, BYREF pdwFlags AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[10] USING ITargetFrame2_GetFrameOptions (pthis, pdwFlags) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetFrameMargins

 

FUNCTION ITargetFrame2_SetFrameMargins ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL dwWidth AS DWORD _
, BYVAL dwHeight AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[11] USING ITargetFrame2_SetFrameMargins (pthis, dwWidth, dwHeight) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetFrameMargins

 

FUNCTION ITargetFrame2_GetFrameMargins ( _
  BYVAL pthis AS DWORD PTR _
, BYREF pdwWidth AS DWORD _
, BYREF pdwHeight AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[12] USING ITargetFrame2_GetFrameMargins (pthis, pdwWidth, pdwHeight) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

FindFrame

 

FUNCTION ITargetFrame_FindFrame ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strTargetName AS STRING _
, BYVAL dwFlags AS DWORD _
, BYREF ppunkTargetFrame AS DWORD _
) AS LONG

  LOCAL HRESULT AS LONG

  strTargetName = UCODE$(strTargetName) & $NUL

  CALL DWORD @@pthis[13] USING ITargetFrame_FindFrame (pthis, strTargetName, dwFlags, ppunkTargetFrame) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetTargetAlias

 

FUNCTION Proto_ITargetFrame2_GetTargetAlias ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pszTargetName AS DWORD _
, BYREF ppszTargetAlias AS DWORD _
  ) AS LONG
 

FUNCTION ITargetFrame2_GetTargetAlias ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strTargetName AS STRING _
, BYREF strTargetAlias AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG

  LOCAL bstrlen AS LONG

  LOCAL ppszTargetAlias AS DWORD

  pszTargetName = UCODE$(pszTargetName) & $NUL
  CALL DWORD @@pthis[14] USING Proto_ITargetFrame2_GetTargetAlias (pthis, STRPTR(strTargetName), ppszTargetAlias) TO HRESULT
  IF ISTRUE ppszTargetAlias THEN
     bstrlen = lstrlenW(BYVAL ppszTargetAlias)
     IF ISTRUE bstrlen THEN
        strTargetAlias = PEEK$(ppszTargetAlias, bstrlen * 2)
        strTargetAlias = ACODE$(strTargetAlias)
     END IF
     CoTaskMemFree ppszTargetAlias
  END IF
  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:05:02 +0200