|
Peter
void QLGCNVCS(char *, char *, char *, long, char *);
Note that there is no * after the word "long", so it is not a pointer.
Scott Klement helped me with this some time ago.
My CLLE is
pgm dcl &badint *dec (4 0) 234 callprc testptr &badint endpgm
My RPGLE is
h nomain
dtestptr pr d 10i 0 value
ptestptr b export
dtestptr pi d intbyvalue 10i 0 value
d moveto s 10i 0
/free moveto = intbyvalue; /end-free
ptestptr e
HTH Vern
At 11:42 AM 5/17/2005, you wrote:
"The &LENGTH parameter in this program is defined as *DEC but the API is expecting *INT. The statement
DCL VAR(&LENGTH) TYPE(*DEC) LEN(4) VALUE(50)
is creating &LENGTH with a value of x'0000050F' which the API is interpreting as 1295 - just a bit longer than the 50 bytes you are really passing. On V5R3 you could change to
DCL VAR(&LENGTH) TYPE(*INT) VALUE(50)
which would give you x'00000032' (a length of 50). Alternatively you could
DCL VAR(&LENGTH) TYPE (*CHAR) LEN(4) VALUE(x'00000032')
Your API call may have appeared to be working OK on prior releases, but you were inadvertently corrupting storage which may have caused other application functions to work "strangely"."
Thank you Bruce for pin-pointing the error and for your advise on this issue. This is oficially the first API I work with and they are tricky when you do not know them too much :o)
Thanks again!
Peter Vidal PALL Corporation / SR Programmer Analyst, IT Development Group 10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111 http://www.pall.com
"Courage is the strength or choice to begin a change. Determination is the persistence to continue in that change." -- Anonymous -- -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.