/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <windows.h>
#include <stdio.h>

typedef int (*DF)(int a, int b);

int main()
{
   HINSTANCE dll1,dll2;
   DF fncptr1,fncptr2;
   dll1 = LoadLibrary("d.dll");
   dll2 = LoadLibrary("d.dll");
#ifndef BCC
   fncptr1 = (DF)GetProcAddress(dll1,"test");
   fncptr2 = (DF)GetProcAddress(dll2,"test");
#else
   fncptr1 = (DF)GetProcAddress(dll1,"_test");
   fncptr2 = (DF)GetProcAddress(dll2,"_test");
#endif
   printf("%d %d\n",(int)dll1,fncptr1(12,34));
   printf("%d %d\n",(int)dll2,fncptr2(12,34));
   return 0;
}
