|
Dan,
The only parm you can legitimately use options(*VARSIZE) on is InputData
(if you'd decided to define it as char(16773000)) and ErrorCode
The key thing with options(*VARSIZE), is that there has to be some way for
the callee to know how much data was actually passed.
InputData has a matching length parm, LengthOfInputData. ErrorCode has a
structure in which the first 4 bytes tell the callee how much space is
available.
I'd do the PR like so:
dcl-pr hash extproc('Qc3CalculateHash');
InputData pointer value;
LengthOfInputData int( 10) const;
InputDataFormatName char( 8) const;
AlgorithmDescription char( 20) const;
AlgorithmDescriptionFormatName char( 8) const;
CryptographicServiceProvider char( 1) const;
CryptographicDeviceName char( 10) const;
Hash char( 16) ;
ErrorCode char( 300) options(*varsize);
end-pr;
You don't need any of the CONST, but I always use them to indicate which
parms are INPUT only. Plus they'd allow you to code the call like so
hash( %addr( DataToHash : *DATA) : inputlen: 'DATA0100':
QC3D0500: 'ALGD0500': cryptoserv:
cryptoDev: HashValue: errorCD);
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.