DLL Programmer's Guide for TNS/R Systems
Sample Sessions and Usage Notes
DLL Programmer’s Guide for TNS/R Systems—522203-002
6-11
Sample Session Three
Next, the main executable file is built. Note that the main program does not use -l to
refer to hellodll at link time.
ld maino -o mainexe -obey $SYSTEM.SYSTEM.libcobey -L $OSS.NSKAPAT4
$SYSTEM.SYSTEM.CCPPMAIN -l ZRLDSRL
LD (T0429G09 - 30APR2003)
(C)2003 Hewlett Packard Development Company, L.P.
T0429's command line: maino -o mainexe -obey $SYSTEM.SYSTEM.libcobey -L
$OSS.NSKAPAT4 $SYSTEM.SYSTEM.CCPPMAIN -l ZRLDSRL
LD INFORMATIONAL MESSAGE **** [40056]:
Entering OBEY file '$SYSTEM.SYSTEM.libcobey'.
Comment: lots of other informational messages edited out . . .
LD INFORMATIONAL MESSAGE **** [40049]:
The library specified as 'ZRLDSRL' in a -l or -lib option was resolved
to the library named '\DLLQA.$SYSTEM.SYS00.ZRLDSRL'.
LD reported 0 errors.
LD reported 0 warnings.
LD reported 14 informational messages.
LD created the following named loadfile as type:
mainexe (ELF, executable, main entry point is 0x70000e98).
LD Timestamp: 31MAR2003 13:37:05
Elapsed Time: 00:00:01
Run The Program
This is a simple run of the program. The first DLL (Hellodll) loads dynamically, and
works just fine. Then rld attempts to load the second DLL (NotThere), but it does not
appear to be there!
RUN mainexe
Hello, I am a DLL!
dlopen of a non-existent dll returns result 75,11
dlopen (70000F3C->NotThere, 1): FileSystem Error 11: File
$SYSTEM.ZDLL.NotThere
NOT Found
ABENDED: 3,305
CPU time: 0:00:00.010
1: Process terminated with warning diagnostics
We also ran the program under Visual Inspect and set breakpoints before and after the
call to Hellodll. In both those places we used a new TACL command LOADEDFILES to
see which files had been loaded at that point. The output from that VI and TACL
session is simple, but nevertheless demonstrates a useful capability in more complex
situations.
LOADEDFILES (and new option for STATUS that shows which process uses a
specified file) is fully documented in the TACL Reference Manual (for G06.20 and
later).