RpcNsBindingExportPnP function
The RpcNsBindingExportPnP function establishes a name-service database entry with multiple binding handles and multiple objects for a server that supports Plug and Play.
Syntax
RPC_STATUS RPC_ENTRY RpcNsBindingExportPnP( unsigned long EntryNameSyntax, unsigned char *EntryName, RPC_IF_HANDLE IfSpec, UUID_VECTOR *ObjectUuidVec );
Parameters
- EntryNameSyntax
-
Syntax of EntryName.
To use the syntax specified in the registry value entry HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.
- EntryName
-
Pointer to the entry name to which binding handles and object UUIDs are exported. You cannot provide a null or empty string.
To use the entry name specified in the registry value entry HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\DefaultEntry, provide a null pointer or an empty string. In this case, the EntryNameSyntax parameter is ignored and the run-time library uses the default syntax.
- IfSpec
-
Stub-generated data structure specifying the interface to export. A null value indicates there are no binding handles to export (only object UUIDs are to be exported) and BindingVec is ignored.
- ObjectUuidVec
-
Pointer to a vector of object UUIDs offered by the server. The server application constructs this vector. A null value indicates there are no object UUIDs to export (only binding handles are to be exported).
Return value
| Value | Meaning |
|---|---|
|
The call succeeded. |
|
There was nothing to export. |
|
The binding handle was invalid. |
|
This was the wrong kind of binding for the operation. |
|
The name syntax is invalid. |
|
The name syntax is unsupported. |
|
The name is incomplete. |
|
No privilege for name-service operation. |
|
The name service is unavailable. |
Remarks
The RpcNsBindingExportPnP function allows a server application to publicly offer an interface in the name-service database that supports Plug and Play bindings for use by any client application.
Note that the server application should not explicitly supply the binding vector when exporting Plug and Play bindings. The bindings are automatically updated when there is a change in the bindings due to a Plug and Play event.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
RpcNsBindingExportPnPW (Unicode) and RpcNsBindingExportPnPA (ANSI) |
See also