McAfee MEJCAE-AM-DA Product Guide - Page 83
PGPeBiz, Syntax, Parameters, Notes
View all McAfee MEJCAE-AM-DA manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 83 highlights
Using the E-Business Server API E-Business Server API functions PGPeBiz Specifies an E-Business Server command. Output buffers for stdout and stderr may be optionally specified. Syntax PGPInt32 PGPeBiz( PGPeBizContextRef context, const char *args, const PGPByte *stdIn, PGPUInt32 stdInLen, PGPByte **stdOut, PGPUInt32 *stdOutLen, PGPByte **stdErr, PGPUInt32 *stdErrLen); Parameters context The context value from PGPeBizInit(). args A null-terminated string containing the command-line arguments for the operation you want to perform. The string contains the arguments exactly as they would be entered on the command line, except for shell extensions, which should not be included since they will not be processed. For example, piping or redirecting input or output should not be included. stdIn stdInLen stdOut The data for the E-Business Server API to use as stdin. This input parameter is optional. Since the data might be binary, the value is not null-terminated. If NULL (0) is specified, then no stdin data will be used. Input parameter that specifies the number of bytes passed in via the parameter. A buffer, internally allocated by the program, that receives the data normally written to stdout (displayed on the screen). This output parameter is optional. If NULL is passed in, then the stdout data is not returned. If NULL is not passed in, then this buffer must be freed by calling PGPeBizFree(). stdOutLen stdErr stdErrLen Output parameter that specifies the length of data, in bytes, placed in the stdOut buffer. A buffer, allocated internally by the program, that receives the data normally written to stderr (displayed on the screen). This output parameter is optional. If NULL is passed in, then the stderr data is not returned. If NULL is not passed in, then this buffer must be freed by calling . Output parameter that specifies the length of data, in bytes, placed in the buffer. Notes The return code for this API is the exit code that is normally set by the E-Business Server executable. Additionally, a few API-specific return codes may be returned that indicate input parameter errors. The output buffers may be useful in diagnosing these errors. A return code of zero indicates success. A non-zero return code indicates an error of some kind. Note that even if the return code is non-zero, the stdOut and stdErr parameters may contain data. The contents of these buffers will usually assist in diagnosing the problem. Unlike the command-line interface, the API does not provide a way to prompt the user for more data. If E-Business Server does not have all the information it needs to complete the call (that is, if it gets to a point where the executable would prompt for user input), then the call will fail and return a useful error code. A possible use for the stdIn parameter would be to pass encrypted data to an API encrypt command without first storing it to disk. 81 E-Business Server™ 8.6 Product Guide