dlltest.pp 587 B

1234567891011121314151617181920212223242526272829303132
  1. {
  2. $Id$
  3. Copyright (c) 1998 by Pierre Muller
  4. Win32 DLL usage example. It needs testdll.pp
  5. }
  6. program dlltest;
  7. procedure p1(x:pointer);
  8. external 'testdll' name 'P1';
  9. procedure proc2(x:longint);
  10. external 'testdll' name 'Proc2';
  11. var
  12. s : string;external 'testdll' name 'FPC_string';
  13. begin
  14. writeln('Main: Hello!');
  15. p1(nil);
  16. writeln('Main: ',Hinstance,' ',Hprevinst);
  17. writeln('Main: testdll s string = ',s);
  18. s:='Changed by program';
  19. proc2(1234);
  20. writeln('Main: press enter');
  21. readln;
  22. end.
  23. {
  24. $Log$
  25. Revision 1.2 2000-07-13 11:33:10 michael
  26. + removed logs
  27. }