Category : OS/2 Files
Archive   : RUNDLL.ZIP
Filename : PROC1.C

 
Output of file : PROC1.C contained in archive : RUNDLL.ZIP
/*
proc1.c -- implements higher-level access to OS/2 run-time dynlinks
cl -c -Lp proc1.c
*/

#define INCL_DOSMODULEMGR
#include "os2.h"
#include "procaddr.h"

#define NIL ((void far *) 0)

WORD loadmodule(ASCIIZ name)
{
WORD h;
return DosLoadModule(NIL, 0, name, (PHMODULE) &h) ? 0 : h;
}

ULONG getprocaddr(WORD module, ASCIIZ name)
{
ULONG pf;
return DosGetProcAddr(module, name, (PPFN) &pf) ? 0 : pf;
}

ULONG procaddr(ASCIIZ module, ASCIIZ name)
{
return getprocaddr(loadmodule(module), name);
}

BOOL freemodule(WORD h)
{
return (! DosFreeModule(h));
}


  3 Responses to “Category : OS/2 Files
Archive   : RUNDLL.ZIP
Filename : PROC1.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/