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.
RPC_STATUS RpcNsBindingExportPnPA( unsigned long EntryNameSyntax, RPC_CSTR EntryName, RPC_IF_HANDLE IfSpec, UUID_VECTOR *ObjectVector );
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.
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.
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.
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).
||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.|
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.
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.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||rpcnsi.h (include Rpc.h)|