RPC HELP DLL GuideLines C Destroy Broker Components

RPC Broker Help Home

DLL Interface Home C: Destroy Broker Components When you are done using any TRPCBroker component, you should call its destroy method to free it from memory. To destroy TRPCBroker components from your C program:

1. Make sure the TRPCBroker component is not connected:

RPCBPropSet(RPCBroker, "Connected", "0");

2. Call the RPCBFree method to destroy the object:

// Destroy the RPCBroker component instance. RPCBFree(RPCBroker);

3. When you have destroyed all TRPCBroker components, but before your application terminates, you should call the Windows API FreeLibrary function to unload the DLL:

FreeLibrary(hLib);