Advertisement
Blizzardo1

Gwabble.h

Sep 10th, 2014
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.62 KB | None | 0 0
  1. /*Copyright (c) 2014, Blizzardo1*/
  2. // The following ifdef block is the standard way of creating macros which make exporting
  3. // from a DLL simpler. All files within this DLL are compiled with the Gwabble_EXPORTS
  4. // symbol defined on the command line. This symbol should not be defined on any project
  5. // that uses this DLL. This way any other project whose source files include this file see
  6. // Gwabble_API functions as being imported from a DLL, whereas this DLL sees symbols
  7. // defined with this macro as being exported.
  8. #include "stdafx.h"
  9. #include <Strsafe.h>
  10.  
  11. #define GWABBLE_EXPORTS
  12.  
  13. #ifdef GWABBLE_EXPORTS
  14. #define GWABBLE_API __declspec(dllexport)
  15. #else
  16. #define GWABBLE_API __declspec(dllimport)
  17. #endif
  18.  
  19. #define GWABBLE int WINAPI
  20. #define VWABBLE void WINAPI
  21. #define GWABBLE_PROTO (HWND mWnd, HWND aWnd, char* data, char* parms, BOOL show, BOOL nopause)
  22.  
  23. #define MIRC_API(procname) GWABBLE procname GWABBLE_PROTO
  24. #define VMIRC_API(procname) GWABBLE_API VWABBLE procname
  25. #define IMIRC_API(procname) GWABBLE_API GWABBLE procname GWABBLE_PROTO
  26.  
  27. //#define lustercopy(dest, szDest, src) StringCchCopy(dest, szDest, src);
  28. #define lustercopy(dest, src) strcpy_s(dest, sizeof(src), src);
  29.  
  30. #define ret(x) { lustercopy(data, x); return 3; }
  31. #define returns(x) lustercopy(data, x); return 3;
  32.  
  33. #pragma comment(linker, "/export:version")
  34. #pragma comment(linker, "/export:getSystemBuild")
  35.  
  36. IShellLink *psl;
  37. IPersistFile *ppf;
  38.  
  39.  
  40. extern "C" {
  41.     class GWABBLE_API CGwabble {
  42.     public:
  43.         CGwabble(void);
  44.     };
  45.  
  46.  
  47.     VWABBLE LoadDll(void*);
  48.     GWABBLE UnloadDll(int timeout);
  49.  
  50.     IMIRC_API(version);
  51.     IMIRC_API(getSystemBuild);
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement