PSRegisterPropertySchema function (propsys.h)
Informs the schema subsystem of the addition of a property description schema file.
Syntax
PSSTDAPI PSRegisterPropertySchema(
[in] PCWSTR pszPath
);
Parameters
[in] pszPath
Type: PCWSTR
Pointer to the full file path, as a Unicode string, to the property description schema (.propdesc) file on the local machine. This can be either a fully-specified full path, or a full path that includes environment variables such as %PROGRAMFILES%
.
Return value
Type: HRESULT
Returns one of the following values.
Return code | Description |
---|---|
|
All property descriptions in the schema were registered. |
|
The calling context does not have proper privileges. |
|
One or more property descriptions in the schema failed to register. The specific failures are logged in the application event log. |
Remarks
This function is a wrapper API for the schema subsystem's implementation of IPropertySystem::RegisterPropertySchema. Call this function only when the file is first installed on the computer. Typically, a setup application calls this function after it installs the .propdesc file, which should be stored in the install directory of the application under Program Files. Multiple calls can be made to IPropertySystem::RegisterPropertySchema in order to register multiple schema files.
When registering property schema files, remember that they can be read by processes running as different users. Therefore, it is important to place a schema file in a location that grants read access to all users on the machine. Similarly, use the absolute path to the file in this function's pszPath parameter.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 with SP1 [desktop apps only] |
Target Platform | Windows |
Header | propsys.h |
Library | Propsys.lib |
DLL | Propsys.dll (version 5.0 or later) |
Redistributable | Windows Desktop Search (WDS) 3.0 |