Home COM GDI+ WebBrowser Data Access

IMarkupServices2 Interface

 

IID_IMarkupServices2

{3050F682-98B5-11CF-BB82-00AA00BDCE0B}

 

 

This interface provides methods, along with the IMarkupContainer2 and IMarkupPointer2 interfaces, that enable you to edit the contents of an HTML document from your C++ program.

 

Documentation: IMarkupServices2 Interface

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IMarkupServices Methods

Description

CreateMarkupPointer

Creates an instance of the IMarkupPointer object.

CreateMarkupContainer

Creates an instance of the IMarkupContainer object.

CreateElement

Creates an element with the specified tag.

CloneElement

Creates a duplicate of an element.

InsertElement

Inserts an element between the target pointers.

RemoveElement

Removes the given element without removing the content contained within it.

Remove

Removes content between two pointers.

Copy

Copies the specified text between markers to a target location.

Move

Moves content between two pointers to a destination specified by a third pointer.

InsertText

Inserts text at the given pointer.

ParseString

Creates an IMarkupContainer that contains the results of parsing the contents of a string.

ParseGlobal

Creates an instance of the element object for the specified tag.

IsScopedElement

Undocumented.

GetElementTagId

Retrieves an element's tag identifier (ID).

GetTagIDForName

Retrieves the tag ID of the element, given its name.

GetNameForTagID

Retrieves the name of the element, given its tag ID.

MovePointersToRange

Positions pointers at the edges of an existing range.

MoveRangeToPointers

Positions the beginning and end of a text range at the positions of two markup pointers.

BeginUndoUnit

Marks the beginning of a reversible unit of work.

EndUndoUnit

Marks the end of a reversible unit of work.

IMarkupServices2 Methods

Description

ParseGlobalEx

Parses an HTML string and inserts the results in a markup container.

ValidateElements

Validates the content between two specified markup pointers in a markup container.

SaveSegmentsToClipboard

Saves the segments contained in the segment list to the Clipboard.

 

CreateMarkupPointer

 

FUNCTION IMarkupServices2_CreateMarkupPointer ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppPointer AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IMarkupServices2_CreateMarkupPointer (pthis, ppPointer) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

CreateMarkupContainer

 

FUNCTION IMarkupServices2_CreateMarkupContainer ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppMarkupContainer AS DWORD _
  ) AS LONG

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

END FUNCTION

 

 

CreateElement

 

FUNCTION IMarkupServices2_CreateElement ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL tagID AS LONG _
, BYVAL strAttributes AS STRING _
, BYREF ppElement AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  strAttributes = UCODE$(strAttributes) & $NUL
  CALL DWORD @@pthis[5] USING IMarkupServices2_CreateElement (pthis, tagID, strAttributes, ppElement) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

CloneElement

 

FUNCTION IMarkupServices2_CloneElement ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pElemCloneThis AS DWORD _
, BYREF ppElementTheClone AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IMarkupServices2_CloneElement (pthis, pElemCloneThis, ppElementTheClone) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

InsertElement

 

FUNCTION IMarkupServices2_InsertElement ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pElementInsert AS DWORD _
, BYVAL pPointerStart AS DWORD _
, BYVAL pPointerFinish AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IMarkupServices2_InsertElement (pthis, pElementInsert, pPointerStart, pPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

RemoveElement

 

FUNCTION IMarkupServices2_RemoveElement ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pElementRemove AS DWORD _
  ) AS LONG

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

END FUNCTION

 

 

Remove

 

FUNCTION IMarkupServices2_Remove ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pPointerStart AS DWORD _
, BYVAL pPointerFinish AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[9] USING IMarkupServices2_Remove (pthis, pPointerStart, pPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Copy

 

FUNCTION IMarkupServices2_Copy ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pPointerSourceStart AS DWORD _
, BYVAL pPointerSourceFinish AS DWORD _
, BYVAL pPointerTarget AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[10] USING IMarkupServices2_Copy (pthis, pPointerSourceStart, pPointerSourceFinish, pPointerTarget) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Move

 

FUNCTION IMarkupServices2_Move ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pPointerSourceStart AS DWORD _
, BYVAL pPointerSourceFinish AS DWORD _
, BYVAL pPointerTarget AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[11] USING IMarkupServices2_Move (pthis, pPointerSourceStart, pPointerSourceFinish, pPointerTarget) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

InsertText

 

FUNCTION IMarkupServices2_InsertText ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strText AS STRING _
, BYVAL cch AS LONG _
, BYVAL pPointerTarget AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  strText = UCODE$(strText) & $NUL
  CALL DWORD @@pthis[12] USING IMarkupServices2_InsertText (pthis, strText, cch, pPointerTarget) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

ParseString

 

FUNCTION IMarkupServices2_ParseString ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strHTML AS STRING _
, BYVAL dwFlags AS DWORD _
, BYREF ppContainerResult AS DWORD _
, BYVAL ppPointerStart AS DWORD _
, BYVAL ppPointerFinish AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  strHTML = UCODE$(strHTML) & $NUL
  CALL DWORD @@pthis[13] USING IMarkupServices2_ParseString (pthis, strHTML, dwFlags, ppContainerResult, ppPointerStart, ppPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

ParseGlobal

 

FUNCTION IMarkupServices2_ParseGlobal ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hglobalHTML AS DWORD _
, BYVAL dwFlags AS DWORD _
, BYREF ppContainerResult AS DWORD _
, BYVAL ppPointerStart AS DWORD _
, BYVAL ppPointerFinish AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[14] USING IMarkupServices2_ParseGlobal (pthis, hglobalHTML, dwFlags, ppContainerResult, ppPointerStart, ppPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

IsScopedElement

 

FUNCTION IMarkupServices2_IsScopedElement ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pElement AS DWORD _
, BYREF pfScoped AS LONG _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[15] USING IMarkupServices2_IsScopedElement (pthis, pElement, pfScoped) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetElementTagId

 

FUNCTION IMarkupServices2_GetElementTagId ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pElement AS DWORD _
, BYREF ptagId AS LONG _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[16] USING IMarkupServices2_GetElementTagId (pthis, pElement, ptagId) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetTagIDForName

 

FUNCTION IMarkupServices2_GetTagIDForName ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL bstrName AS STRING _
, BYREF ptagId AS LONG _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[17] USING IMarkupServices2_GetTagIDForName (pthis, bstrName, ptagId) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetNameForTagID

 

FUNCTION IMarkupServices2_GetNameForTagID ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL tagId AS LONG _
, BYREF pbstrName AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[18] USING IMarkupServices2_GetNameForTagID (pthis, tagId, pbstrName) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

MovePointersToRange

 

FUNCTION IMarkupServices2_MovePointersToRange ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pIRange AS DWORD _
, BYVAL pPointerStart AS DWORD _
, BYVAL pPointerFinish AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[19] USING IMarkupServices2_MovePointersToRange (pthis, pIRange, pPointerStart, pPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

MoveRangeToPointers

 

FUNCTION IMarkupServices2_MoveRangeToPointers ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pPointerStart AS DWORD _
, BYVAL pPointerFinish AS DWORD _
, BYVAL pIRange AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[20] USING IMarkupServices2_MoveRangeToPointers (pthis, pIRange, pPointerStart, pPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

BeginUndoUnit

 

FUNCTION IMarkupServices2_BeginUndoUnit ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL strTitle AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG
  strTitle = UCODE$(strTitle) & $NUL
  CALL DWORD @@pthis[21] USING IMarkupServices2_BeginUndoUnit (pthis, strTitle) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

EndUndoUnit

 

FUNCTION IMarkupServices2_EndUndoUnit ( _
  BYVAL pthis AS DWORD PTR _
  ) AS LONG

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

END FUNCTION

 

 

ParseGlobalEx

 

FUNCTION IMarkupServices2_ParseGlobalEx ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hglobalHTML AS DWORD _
, BYVAL dwFlags AS DWORD _
, BYVAL pContext AS DWORD _
, BYREF ppContainerResult AS DWORD _
, BYVAL pPointerStart AS DWORD _
, BYVAL pPointerFinish AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[23] USING IMarkupServices2_ParseGlobalEx (pthis, hglobalHTML, dwFlags, pContext, ppContainerResult, pPointerStart, pPointerFinish) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

ValidateElements

 

FUNCTION IMarkupServices2_ValidateElements ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pPointerStart AS DWORD _
, BYVAL pPointerFinish AS DWORD _
, BYVAL pPointerTarget AS DWORD _
, BYREF pPointerStatus AS DWORD _
, BYREF ppElemFailBottom AS DWORD _
, BYREF ppElemFailTop AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[24] USING IMarkupServices2_ValidateElements (pthis, pPointerStart, pPointerFinish, pPointerTarget, pPointerStatus, ppElemFailBottom, ppElemFailTop) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SaveSegmentsToClipboard

 

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

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[25] USING IMarkupServices2_SaveSegmentsToClipboard (pthis, pSegmentList, dwFlags) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:00:52 +0200