Gets atom ID by it's string representation.
Syntax
HRESULT StrToAtom ([in] LPWSTR sString, |
[out, retval] ULONG * nAtom); |
Parameters
- sString
- [in] Value of LPWSTR containing the string representation of the atom.
- nAtom
- [out, retval] Pointer to ULONG containing the resulting atom ID.
Return Value
Returns S_OK if operation was successful or error code in other cases.
Sample
02 | private void RemoveSquareAnnotations(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) |
04 | PDFXEdit.IPXS_Inst pSInt = (PDFXEdit.IPXS_Inst)Inst.GetExtension( "PXS" ); |
05 | uint nSquareAtom = pSInt.StrToAtom( "Square" ); |
06 | int nID = Inst.Str2ID( "op.annots.delete" , false ); |
07 | PDFXEdit.IOperation Op = Inst.CreateOp(nID); |
08 | PDFXEdit.ICabNode input = Op.Params.Root[ "Input" ]; |
10 | for ( uint i = 0; i < Doc.CoreDoc.Pages.Count; i++) |
12 | PDFXEdit.IPXC_Page page = Doc.CoreDoc.Pages[i]; |
13 | uint nCnt = page.GetAnnotsCount(); |
14 | for ( uint j = 0; j < nCnt; j++) |
16 | PDFXEdit.IPXC_Annotation annot = page.GetAnnot(j); |
17 | if (annot.Type == nSquareAtom) |
18 | input.Add().v = annot; |
See Also
IPXS_Inst