RPC HELP DLL GuideLines C Destroy Broker Components

From VistApedia
Revision as of 16:16, 8 July 2015 by Kdtop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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);