Jump to content

WPToolsQueryObject

From EDM2
Revision as of 04:15, 24 February 2015 by Martini (talk | contribs)

WPToolsQueryObject


Purpose

Query object data.


Usage

rc=WPToolsQueryObject(object, [Class], [Title], [Setup], [Location])

Where:

       object = A fully qualified path name to a file or directory, or
                An OBJECTID string (e.g. <WP_DESKTOP>), or
                A string starting with a '#' and being followed
                by a hexadecimal object handle (See WPToolsFolderContent)
       Class  = The name of a REXX variable, enclosed in quotes,
                that will be created by WPTOOLS and will contain the
                class name of the object. This argument is optional.
       Title  = The name of a REXX variable, enclosed in quotes,
                that will be created by WPTOOLS and will contain the
                title of the object. This argument is optional.
       Setup  = The name of a REXX variable, enclosed in quotes,
                that will be created by WPTOOLS and will contain the
                setup string of the object. This argument is optional.
       Location = The name of a REXX variable, enclosed in quotes,
                that will be created by WPTOOLS and will contain the
                location of the object. This argument is optional.

Returns: 1 on success and 0 when a error occurred.

Please note that only the object argument is mandatory. All other arguments only need to be present when the result is needed. Should you not need one argument, but need a argument that is after the not needed one, make sure you enter all comma's. (e.g.: rc = WPToolsQueryObject(object,,,"SetupString")

See Appendix I and II for information about objects and the setup values this call returns.


Example

/* REXX must start with a comment line */

call RxFuncAdd 'WPToolsLoadFuncs', 'WPTOOLS', 'WPToolsLoadFuncs'
call WPToolsLoadFuncs

iRetco = WPToolsQueryObject("<WP_DESKTOP>", "szClass", "szTitle", "szSetupString", "szLocation")
if Iretco Then do
     say 'Class name :' szclass
     say 'Title      :' sztitle
     say 'Location   :' szlocation
     say 'Setupstring:' szsetupstring
  end
else
  say 'Unable to return object settings for <WP_DESKTOP>'