RPC function names generally consist of the prefix "Rpc," an object name, and a verb that describes an operation on that object. The functions, with some exceptions, are named as shown:
RpcObjectOperation
Functions that operate on UUID objects omit the prefix "Rpc" and start with the object name "Uuid."
The functions provided with this version of Microsoft RPC operate on the following objects:
Object |
Object in function name |
Example |
---|---|---|
Binding handle | Binding | RpcBindingFree |
Endpoint | Ep | RpcEpRegister |
Interface | If | RpcIfInqId |
Management | Mgmt | RpcMgmtStopServerListening |
Name-service group entry | NsGroup | RpcNsGroupDelete |
Name-service management | NsMgmt | RpcNsMgmtEntryCreate |
Name-service profile entry | NsProfile | RpcNsProfileEltAdd |
Name-service server entry | NsBinding | RpcNsBindingExport |
Network | Network | RpcNetworkInqProtseqs |
Object, type UUID mapping | Object | RpcObjectSetType |
Protocol-sequence vector | ProtseqVector | RpcProtseqVectorFree |
Server | Server | RpcServerListen |
String | String | RpcStringFree |
String binding | StringBinding | RpcStringBindingCompose |
UUID | Uuid | UuidCreate |
Microsoft RPC function names are derived by converting the first character of the OSF-DCE RPC function name, and every character that follows an underscore character, to uppercase and then removing underscore characters. For example, the OSF-DCE function rpc_server_use_all_protseqs_if is named RpcServerUseAllProtseqsIf in Microsoft RPC.
Microsoft data-structure names are derived from the OSF-DCE names by converting all characters to uppercase and removing the trailing suffix _t. For example, the OSF-DCE data structure rpc_binding_vector_t is named RPC_BINDING_VECTOR in Microsoft RPC.
In the header files provided in Microsoft RPC, each RPC function that takes character-string parameters appears in two forms: followed by the suffix "A" and followed by the suffix "W." The "A" suffix represents the ASCII-character string version of the function and the "W" suffix represents the wide-character string version. The identifier UNICODE determines which version of the function is selected. The standard function name is mapped to either the ASCII or the wide-character string version.
Wide-character versions of the RPC functions are selected when you define the identifier UNICODE. You can define the identifier either with a #define preprocessor directive or with the /D option of the Microsoft C/C++ version 7.0 compiler. For example:
#define UNICODE
main()
cl /DUNICODE filename.c
You can use the wide-character version of a function on one side of the distributed application and the ASCII version on the other side. You do not need to use the same versions of the functions with both the client and server applications. You can use both versions in the same application.