home *** CD-ROM | disk | FTP | other *** search
/ DarkBasic Professional / DarkBasicPro.iso / data1.cab / Lang_Files_(English) / Help / examples / system / system2-example.dba < prev    next >
Encoding:
Text File  |  2004-09-22  |  1.1 KB  |  57 lines

  1. rem System Functionality
  2.  
  3. rem Standard Setup Code for all examples
  4. set text font "arial" : set text size 16
  5. set text to bold : set text transparent
  6.  
  7. rem Set and read global controls
  8. print "Memory Available"
  9. print "Texture:";system tmem available()
  10. print "Display:";system dmem available()
  11. print "System:";system smem available()
  12. print "Hit Any Key"
  13. wait key
  14. sync
  15.  
  16. rem Deactivate escape keys
  17. disable escapekey
  18. disable systemkeys
  19. print "ESCAPE No Longer Quits - Press Any Key"
  20. wait key
  21.  
  22. rem Restore system keys
  23. enable systemkeys
  24. enable escapekey
  25.  
  26. print "Loading DLL..."
  27. LOAD DLL "TestDLL.dll",1
  28. if DLL EXIST(1)=1
  29.  
  30.  print "Calling DLL Function...";
  31.  if DLL CALL EXIST(1, "?MyFunc@@YAXXZ")=1
  32.   print "okay."
  33.   CALL DLL 1, "?MyFunc@@YAXXZ"
  34.  else
  35.   print "does not exist."
  36.  endif
  37.  
  38.  print "Calling DLL Function with Return Value...";
  39.  if DLL CALL EXIST(1, "?MyFunc@@YAHH@Z")=1
  40.   print CALL DLL(1, "?MyFunc@@YAHH@Z")
  41.  else
  42.   print "does not exist."
  43.  endif
  44.  
  45.  print "Deleting DLL..."
  46.  DELETE DLL 1
  47.  
  48. else
  49.  print "not loaded."
  50. endif
  51.  
  52. rem Set an exit prompt
  53. exit prompt "Exit","Prompt"
  54.  
  55. print "Done. Kit Any Key"
  56. wait key
  57.