Custom DLL.c 634 B

12345678910111213141516171819202122232425262728293031
  1. // Custom DLL example; must be named "mydll"
  2. // Note: You should not use DLLs under normal circumstances; see section
  3. // "How to break the 64 KB limit using a DLL" for more information.
  4. #define USE_TI89
  5. #include <tigcclib.h>
  6. DLL_INTERFACE
  7. char MessageInDLL[]="Hello!\n";
  8. long GlobalVarInDLL;
  9. void HelloFromDLL(void);
  10. int SumFromDLL(int,int);
  11. DLL_ID 372377271
  12. DLL_VERSION 2,12
  13. DLL_EXPORTS HelloFromDLL,SumFromDLL,MessageInDLL,&GlobalVarInDLL
  14. DLL_IMPLEMENTATION
  15. void HelloFromDLL(void)
  16. {
  17. printf ("Hello from DLL!\n");
  18. printf ("Global variable is %ld\n", GlobalVarInDLL);
  19. }
  20. int SumFromDLL(int a, int b)
  21. {
  22. return (a + b);
  23. }