IOpcFactory::CreatePartUri method (msopc.h)
Creates a part URI object that represents a part name.
Syntax
HRESULT CreatePartUri(
[in] LPCWSTR pwzUri,
[out, retval] IOpcPartUri **partUri
);
Parameters
[in] pwzUri
A URI that represents the location of a part relative to the root of the package that contains it.
[out, retval] partUri
A pointer to the IOpcPartUri interface of the part URI object. This object represents the part name derived from the URI passed in pwzUri.
Part names must conform to the syntax specified in the OPC.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code/value | Description |
---|---|
|
The method succeeded. |
|
At least one of the pwzUri and partUri parameters is NULL. |
|
A part name cannot be the empty string "". |
|
A part name cannot be a '/'. |
|
A part name cannot begin with "//". |
|
A part name cannot end with a '/'. |
|
A part name cannot end with a '.'. |
|
A part name cannot have any segments that end with a '.'. |
|
A part name cannot have fragment component. A fragment component is preceded by a '#' character, as described in RFC 3986: URI Generic Syntax. |
|
A part name cannot be the name of a Relationships part that indicates another Relationships part as the source of the relationships contained therein. |
|
A part name cannot be an absolute URI. An absolute URI begins with a schema component followed by a ":", as described in RFC 3986: URI Generic Syntax. |
|
An HRESULT error code from the CreateUri function. |
|
An HRESULT error code from a WinINet API. |
Remarks
Support on Previous Windows Versions
The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting Started with the Packaging API, and Platform Update for Windows Vista.Thread Safety
Packaging objects are not thread-safe.
For more information, see the Getting Started with the Packaging API.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | msopc.h |
See also
External Resources
Getting Started with the Packaging API
Overviews
Packaging API Programming Guide
Platform Update for Windows Vista
Reference