× 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.



On 9/17/2013 6:44 PM, DeLong, Eric wrote:
Larry, even though C is asking for pointers, remember that RPG passes by reference automatically. The net effect is that you simply define these as very long character fields, and just pass the variable references normally. There's a guide (Written by Barbara Morris) that covers some of the quirks of converting C prototypes to RPG...

http://www.opensource400.org/callc.html

Don't use that one, it's way out of date. Use the one I list at the end of this post.



D VprtXML PR EXTPROC('VprtXML')
D pConn * value
D pSession *
D pXmlBuf 65500a options(*varsize)
D pXmlResult 65500a options(*varsize)
D pResultSize 10I 0


I would use * VALUE OPTIONS(*STRING) for the pXmlBuf parameter, since it's an input-only null-terminated string parameter. Larry, if you pass pass a character string to that type of parameter, you don't have to bother null-terminating it; the RPG compiler will handle the null-termination.

Here's a much more up-to-date version of my "Converting C Prototypes to RPG" document: https://ibm.biz/BdxQbC

(The long version of that URL is
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/We13116a562db_467e_bcd4_882013aec57a/page/Converting%20C%20Prototypes%20to%20RPG)


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.