Geoff Chappell - Software Analyst
HRESULT CPL_CreateCondition ( PCWSTR name, IXMLDOMNode *node, REFIID riid, PVOID *ppv);
The name argument is the address of a null-terminated Unicode string that names the condition.
The node argument is the address of an interface through which to obtain the condition’s name and optionally a set of named properties and values.
The riid argument provides the IID of the desired interface.
The ppv argument is the address of a variable that is to receive a pointer to the desired interface.
The function returns zero for success, else an error code.
The function needs either a name or node. If both are both NULL, the function fails (returning E_ACCESSDENIED). If both are given, the name has precedence.
Without a name, the function creates a CTaskCondition instance and initialises it through the InitFromXml method of its ITaskConditionInit interface. If the name is “shcond://v1#ConditionCombiner”, the function creates an uninitialised CTaskConditionCombiner instance. For any other name, the function creates a CTaskCondition instance and initialises it through the Init method of its ITaskConditionInit interface.
Whatever object is created, the function queries for the desired interface. Any failures to create, initialise or query are failures for the function.
The CPL_CreateCondition function is exported from SHELL32.DLL as ordinal 857 in the version 6.00 from Windows Vista, and higher.
This function was not documented by Microsoft for the January 2007 edition of the Windows Vista Software Development Kit (SDK).