RpcNsBindingExportPnPA function (rpcnsi.h)
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 RpcNsBindingExportPnPA(
unsigned long EntryNameSyntax,
RPC_CSTR EntryName,
RPC_IF_HANDLE IfSpec,
UUID_VECTOR *ObjectVector
);
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.
ObjectVector
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.
Note
The rpcnsi.h header defines RpcNsBindingExportPnP as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | rpcnsi.h (include Rpc.h) |
Library | Rpcns4.lib |
DLL | Rpcns4.dll |