From: system@SendSpamHere.ORG Sent: Wednesday, March 22, 2000 7:08 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: EPID to IPID In article <009E776E.C21582DA.25@decus.de>, radkowitsch@decus.de writes: >> $GETJPI doesn't appear to have support for returning IPIDs. Anyone have any >> other ideas or have some pre-written MACRO I can call from "C"? > >There should exists a function like: > unsigned long EXE_STD$CVT_EPID_TO_IPID (unsigned long EPid) >that you can call from C. The EXE_STD$CVT_EPID_TO_IPID is OpenVMS Alpha only. If this code it to function on a VAX as well, there is no "#pragma linkage" in the VAX DECC compiler which might have allowed "c" access to EXE$EPID_TO_IPID. Looks like only another language routine will work here. This is a simple MACRO routine which will get you access to the routine on both VAX and Alpha. .WEAK EXE$EPID_TO_IPID,EXE$CVT_EPID_TO_IPID .PSECT $M$CODE,NOWRT,EXE,5 .ENTRY CALL_JACKET$EPID_TO_IPID,0 MOVL 4(AP),R0 PUSHAL EXE$EPID_TO_IPID!EXE$CVT_EPID_TO_IPID JSB @(SP) RET .END prototype: int call_jacket$epid_to_ipid(int); calling it: c_entry(...) { . . . int my_epid, my_ipid; . . . my_ipid = call_jacket$epid_to_ipid ( my_epid ); . . . } VAX: $ MACRO CALL_JACKET$EPID_TO_IPID $ LINK your_program,CALL_JACKET$EPID_TO_IPID,SYS$SYSTEM:SYS/STB Alpha: $ MACRO/WARN=NOINFO CALL_JACKET$EPID_TO_IPID $ LINK your_program,CALL_JACKET$EPID_TO_IPID/SYSEXE I'd prefer using the above code which will 'compile' on both VAX and Alpha only because my builds will then be the same code on both platforms. Your needs and desires may be different but I prefer to maintain as *common* a code base as possible for products that I maintain. -- VAXman- OpenVMS APE certification number: AAA-0001 VAXman@TMESIS.COM