Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

sio_util.h

By: Kreldin on Dec 4th, 2012  |  syntax: C++  |  size: 0.80 KB  |  views: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //---------------------------------------------------------------------------
  2. #if defined(_WINDOWS)
  3.   #define DLLENTRY(type) extern "C" type __stdcall
  4.   #include <windows.h>
  5. #else
  6.   #define DLLENTRY(type) extern "C" WINAPI __declspec(dllexport) type
  7.   #include <vcl.h>
  8. #endif
  9. //---------------------------------------------------------------------------
  10.  
  11. DLLENTRY(int)    SimpleMsgBox(char *msgstr);
  12. DLLENTRY(HANDLE) SioOpen(char *name, unsigned int baudrate);
  13. DLLENTRY(BOOL)   SioChangeBaud(HANDLE ComPort, unsigned int baudrate);
  14. DLLENTRY(BOOL)   SioPutChars(HANDLE ComPort, char *stuff, int n);
  15. DLLENTRY(DWORD)  SioGetChars(HANDLE ComPort, char *stuff, int n);
  16. DLLENTRY(DWORD)  SioTest(HANDLE ComPort);
  17. DLLENTRY(BOOL)   SioClrInbuf(HANDLE ComPort);
  18. DLLENTRY(BOOL)   SioClose(HANDLE ComPort);