× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Bob,

Qusptrus('QGPL/MYSTUFF' : pData : apiErrorDS);
> foo(pData : 1000000);

This passes the address of the data in the user space, and tells the
subproc that it is 1 megabyte in size. No conversion is performed and
the pointer to that data is passed to the foo() subprocedure.

I completely disagree. Your code uses a separate parameter (the length parameter) to dictate the length of the string. It does not use a null-terminator, and therefore should not be coded with options(*String).

Just code it as a normal pointer. When you want to pass a variable directly, use %ADDR(). When you want to write data from a pointer (such as your user space example) then pass the pointer directly. It's much easier to read and understand, and doesn't confuse people who then start thinking that options(*string) requires %addr().

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.