RPC HELP DLL SI RPC Results

From VistApedia
Jump to: navigation, search

RPC Broker Help Home

DLL Interface Home

RPC Results from DLL Calls

When executing an RPC on a VistA M Server, results from the RPC are returned as a text stream. This text stream may or may not have embedded <CR><LF> character combinations.

In Delphi, when you call an RPC using the TRPCBroker component directly, the text stream returned from an RPC is automatically parsed and returned in the TRPCBroker component's Results property, either in Results[0] or in multiple Results nodes. If there are no embedded <CR><LF> character combinations in the text stream, only Results[0] is used. If there are embedded <CR><LF> character combinations, results are placed into separate Results nodes based on the <CR><LF> delimiters.

When using the DLL interface, the return value is a text stream, but no processing of the text stream is performed for you. It is up to you to parse out what would have been individual Results nodes in Delphi, based on the presence of any <CR><LF> character combinations in the text stream.

NOTE: You must create a character buffer large enough to receive the entire return value of an RPC.