TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Murray Lesser
from: David Noon
date: 1994-11-27 20:45:12
subject: Toolkit 3.0 Problem

On Friday, 11-25-1994  Murray Lesser wrote to David Noon about
"Toolkit 3.0 Problem" as follows:

ML> /* bingo.c - a test DLL for text.cmd */
ML>     
ML>     #define INCL_RXFUNC     /* Loads REXX "external
function" type   */
ML>     #define INCL_NOMAPI     /*   definitions and function prototypes */
ML>     #include 
ML>     #include 
ML>     #include 
ML>     #include 
ML>     
ML>     RexxFunctionHandler Bingo;  /* Type definition in rexxsaa.h */
         ^^^^^^^^^^^^^^
         Some bad things happen here.

ML>     
ML>     ULONG Bingo(                     /* REXX External Function */
             ^
             APIENTRY should go here.

ML>             CHAR      *name,
ML>             ULONG     Numargs,
ML>             RXSTRING  Args[],
ML>             CHAR      *Queuename,
ML>             RXSTRING  *retstr)         /* Output string goes here */

G'day Murray,

There appears to be an error in  in that it provides
different definitions for RexxFunctionHandler based on whether
__cplusplus is defined or not. This is, of course, totally invalid,
since REXX's calling sequence is the same irrespective of the compiler
language being used. It should always use _System linkage (i.e.
APIENTRY) and any linguistic adjustments should be done in the
APIENTRY definition.

I removed the prototype and added APIENTRY to the entry point
definition and it ran correctly.

Regards

Dave

 * KWQ/2 1.2g * Johnson & Johnson Tagline: XXXXXXXXXXXXXXX "ouch"
--- Maximus/2 2.02

* Origin: OS/2 Shareware BBS, Fairfax, VA: 703-385-4325 (1:109/347)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 109/347 2 7 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.