I solved my problem

the problem was with the parameter i pass to the rpg function

i have a function FUNCTION1(char *parm1)

this function call RPGFUNCTION(char *parmforrpg)

when you use like this

FUNCTION(char *parm)



and then atempt to use the parm variable i get a null pointer

so my workaround was

FUNCTION(char *parm)

char buffer[64];


strcpy(parm, buffer);


I hope this help someone else


Date: Thu, 9 Sep 2010 11:52:25 -0500
From: c400-l@xxxxxxxxxxxxxxxx
To: c400-l@xxxxxxxxxxxx
Subject: Re: [C400-L] ILE C++ and ILE RPG

My guess is that your RPG procedure interface (PI) doesn't match the C
prototype you're calling.

On 9/9/2010 10:56 AM, Victor Gonzalez wrote:

After i return from the RPG procedure i can not access the next function due to null pointer exception.
the module invoking the next function is QC2PFMO from procedure _C PSX dofmto, i think is a system prodecure

Thanks for the help

This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.

This thread ...


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

This mailing list archive is Copyright 1997-2020 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].