Bartell, Aaron L. (TC) wrote:
So would this be considered dishonest programming. <BG>

Seriously though, is it safe to assume that it will allocate the amount I
say the length of my content is even though my variable maxes out at 32K?
Assuming QtmhRdStin is written in ILE C (based on the documentation) and
assuming ILE C doesn't have the same variable size limitations RPG has,
wouldn't this work?  I am not a C programmer so I am making some assumptions
here.  What else would it use the "Length of receiver variable" parm for
other than to allocate the appropriate amount of space?

There isn't a max length listed that I can specify for that parm. . .


I don't know what language the API was written in, nor does it really matter. According to the docs, the first parameter is where the results get written to, the second parameter says how big that area is, and the third tells you how many bytes were actually stored in the result. If the receiver of the data is not in reality as big as what you tell the API, then you're going to be overwriting (possibly important) storage.


Cheers! Hans



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.