Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/09/2011, 11:11
pacoman
 
Fecha de Ingreso: septiembre-2011
Mensajes: 22
Antigüedad: 13 años, 3 meses
Puntos: 1
Respuesta: Problemas con DLL en C++

PARTE 1

Código C++:
Ver original
  1. #include <windows.h>
  2. #include <stdio.h>
  3.  
  4. #ifdef STATIC_LIBRARY
  5.    #define DLL_IMPORT_EXPORT
  6. #else
  7.    #ifdef DLL_SOURCE_CODE
  8.       #define DLL_IMPORT_EXPORT __declspec(dllexport) __stdcall
  9.    #else
  10.       #define DLL_IMPORT_EXPORT __declspec(dllimport) __stdcall
  11.    #endif
  12. #endif
  13.  
  14. #ifdef __cplusplus
  15.   #define NoMangle extern "C"
  16. #else
  17.   #define NoMangle
  18. #endif
  19.  
  20. #define SEE_MIN_RESPONSE_WAIT   1
  21. #define SEE_MAX_RESPONSE_WAIT   2
  22. #define SEE_CONNECT_WAIT        3
  23. #define SEE_DISABLE_MIME        4
  24. #define SEE_QUOTED_PRINTABLE    8
  25. #define SEE_AUTO_CALL_DRIVER    9
  26. #define SEE_FILE_PREFIX        10
  27. #define SEE_SLEEP_TIME         13
  28. #define SEE_DECODE_UNNAMED     14
  29. #define SEE_SMTP_PORT          15
  30. #define SEE_POP3_PORT          16
  31. #define SEE_MAX_LINE_LENGTH    17
  32. #define SEE_BLOCKING_MODE      18
  33. #define SEE_ALLOW_8BITS        19
  34. #define SEE_LOG_FILE           20
  35. #define SEE_HIDE_SAVED_MSG     21
  36. #define SEE_HIDE_TO_ADDR       22
  37. #define SEE_ADDRESS_DELIMITER  23
  38. #define SEE_WSACLEANUP         24
  39. #define SEE_PATH_DELIMITER     25
  40. #define SEE_ATTACH_DELIMITER   26
  41. #define SEE_ENABLE_IMAGE       27
  42. #define SEE_RAW_MODE           28
  43. #define SEE_ENABLE_ESMTP       29
  44. #define SEE_ENABLE_APOP        30
  45. #define SEE_ATTACH_BASE_NUMBER 31
  46. #define SEE_IGNORE_REJECTED    32
  47. #define SEE_WRITE_CONTENT_TYPE 33
  48. #define SEE_SET_FILE_PREFIX    34
  49. #define SEE_HTML_CHARSET       35
  50. #define SEE_HIDE_HEADERS       36
  51. #define SEE_KEEP_RFC822_INTACT 37
  52. #define SEE_IMAP_PORT          38
  53. #define SEE_EXPUNGE_ON_CLOSE   39
  54. #define SEE_GUT_ATTACHMENTS    40
  55.  
  56. #define CHARSET_BLANK        0
  57. #define CHARSET_US_ASCII     1
  58. #define CHARSET_8859         4
  59. #define CHARSET_ISO_8859_1   4
  60. #define CHARSET_ISO_8859_8   5
  61. #define CHARSET_WIN_1252     6
  62. #define CHARSET_WIN_1255     7
  63. #define CHARSET_UTF8         8
  64. #define CHARSET_ISO_8859_2  10
  65. #define CHARSET_ISO_8859_7  11
  66. #define CHARSET_WIN_1250    12
  67. #define CHARSET_ISO_8859_3  13
  68. #define CHARSET_ISO_8859_4  14
  69.  
  70. #define SEE_GET_ERROR_TEXT     1
  71. #define SEE_GET_COUNTER        2
  72. #define SEE_GET_RESPONSE       3
  73. #define SEE_GET_SOCK_ERROR     4
  74.  
  75. #define SEE_GET_MESSAGE_BYTES_READ  10
  76. #define SEE_GET_ATTACH_BYTES_READ   11
  77. #define SEE_GET_TOTAL_BYTES_READ    12
  78. #define SEE_GET_MESSAGE_BYTES_SENT  13
  79. #define SEE_GET_ATTACH_BYTES_SENT   14
  80. #define SEE_GET_TOTAL_BYTES_SENT    15
  81. #define SEE_GET_VERSION             16
  82.  
  83. #define SEE_GET_MSG_COUNT           17
  84. #define SEE_GET_MSG_SIZE            18
  85. #define SEE_GET_BUFFER_COUNT        19
  86.  
  87. #define SEE_GET_CONNECT_STATUS      20
  88. #define SEE_GET_REGISTRATION        21
  89. #define SEE_GET_ATTACH_COUNT        22
  90. #define SEE_GET_LAST_RESPONSE       23
  91. #define SEE_GET_VERIFY_STATUS       24
  92. #define SEE_GET_SERVER_IP           25
  93. #define SEE_GET_BUILD               26
  94. #define SEE_GET_SOCKET              27
  95. #define SEE_GET_LOCAL_IP            28
  96. #define SEE_GET_ATTACH_NAMES        29
  97. #define SEE_GET_LAST_RECIPIENT      30
  98. #define SEE_GET_AUTH_PROTOCOLS      31
  99. #define SEE_GET_ATTACH_TYPES        32
  100. #define SEE_GET_ATTACH_IDS          33
  101.  
  102. #define SEE_COPY_BUFFER             40
  103. #define SEE_WRITE_BUFFER            41
  104.  
  105. #define SEE_SET_REPLY               50
  106. #define SEE_SET_HEADER              51
  107. #define SEE_WRITE_TO_LOG            52
  108. #define SEE_SET_FROM                53
  109. #define SEE_SET_CONTENT_TYPE        54
  110. #define SEE_SET_TRANSFER_ENCODING   55
  111. #define SEE_ADD_HEADER              56
  112. #define SEE_SET_SECRET              57
  113. #define SEE_SET_USER                58
  114. #define SEE_SET_TEXT_MESSAGE        59
  115. #define SEE_FORCE_INLINE            60
  116. #define SEE_SET_ATTACH_CONTENT_TYPE 61
  117. #define SEE_AUTHENTICATE_PROTOCOL   62
  118. #define SEE_SET_CONTENT_TYPE_PREFIX 63
  119. #define SEE_ENABLE_XMAILER          64
  120. #define SEE_SET_DEFAULT_ZONE        65
  121. #define SEE_SET_ATTACH_DESCRIPTION  66
  122. #define SEE_REPLACE_WITH_COMMAS     67
  123. #define SEE_SET_MULTIPART           68
  124. #define SEE_SET_TIME_ZONE           69
  125. #define SEE_SET_RAWFILE_PREFIX      70
  126. #define SEE_SET_IMAP_LIST_ARG       71
  127. #define SEE_SET_FOOTER              72
  128. #define SEE_SET_LOCAL_IP            73
  129. #define SEE_SET_HELO_STRING         74
  130.  
  131. #define QUOTED_OFF          0
  132. #define QUOTED_PLAIN        1
  133. #define QUOTED_HTML         2
  134. #define QUOTED_RICH         3
  135. #define QUOTED_8859         4
  136. #define QUOTED_ISO_8859_1   4
  137. #define QUOTED_ISO_8859_8   5
  138. #define QUOTED_WIN_1252     6
  139. #define QUOTED_WIN_1255     7
  140. #define QUOTED_USER         9
  141. #define QUOTED_ISO_8859_2  10
  142. #define QUOTED_ISO_8859_7  11
  143. #define QUOTED_WIN_1250    12
  144. #define QUOTED_ISO_8859_3  13
  145. #define QUOTED_ISO_8859_4  14
  146.  
  147. #define INLINE_TEXT_OFF         0
  148. #define INLINE_TEXT_INLINE      1
  149. #define INLINE_TEXT_ATTACHMENT  2
  150.  
  151. #define AUTHENTICATE_CRAM    1
  152. #define AUTHENTICATE_LOGIN   2
  153. #define AUTHENTICATE_PLAIN   4
  154.  
  155. #define CONTENT_TYPE_DEFAULT       0
  156. #define CONTENT_TYPE_MIXED         1
  157. #define CONTENT_TYPE_ALTERNATIVE   2
  158. #define CONTENT_TYPE_RELATED       3
  159.  
  160. #define BYTE  unsigned char
  161.  
  162. #define IMAP_FLAG_SEEN         1
  163. #define IMAP_FLAG_ANSWERED     2
  164. #define IMAP_FLAG_FLAGGED      4
  165. #define IMAP_FLAG_DELETED      8
  166. #define IMAP_FLAG_DRAFT       16
  167. #define IMAP_FLAG_RECENT      32
  168.  
  169. #define IMAP_GET_FLAGS         1
  170. #define IMAP_SET_FLAGS         2
  171. #define IMAP_DEL_FLAGS         3
  172.  
  173. #define IMAP_SEARCH_MSG_COUNT  1
  174. #define IMAP_SEARCH_FIRST_MSG  2
  175. #define IMAP_SEARCH_NEXT_MSG   3
  176.  
  177. #define SEE_USE_STUNNEL        1
  178.  
  179. #define SEE_PROXY_MANUAL_START 1
  180. #define SEE_PROXY_AUTO_START   2
  181.  
  182. NoMangle int  DLL_IMPORT_EXPORT  seeAbort(int);
  183. NoMangle int  DLL_IMPORT_EXPORT  seeAttach(int, unsigned);
  184. NoMangle int  DLL_IMPORT_EXPORT  seeAttachmentParams(char *,char *,char *,char *);
  185. NoMangle int  DLL_IMPORT_EXPORT  seeByteToShort(char *);
  186. NoMangle int  DLL_IMPORT_EXPORT  seeClose(int);
  187. NoMangle int  DLL_IMPORT_EXPORT  seeCommand(int,char *);
  188. NoMangle int  DLL_IMPORT_EXPORT  seeDebug(int,int,char *,int);
  189. NoMangle int  DLL_IMPORT_EXPORT  seeDecodeBuffer(char *,char *,int);
  190. NoMangle int  DLL_IMPORT_EXPORT  seeDecodeUTF8(char *,char *);
  191. NoMangle int  DLL_IMPORT_EXPORT  seeDecodeUU(char *, char *);
  192. NoMangle int  DLL_IMPORT_EXPORT  seeDeleteEmail(int,int);
  193. NoMangle int  DLL_IMPORT_EXPORT  seeDriver(int);
  194. NoMangle int  DLL_IMPORT_EXPORT  seeEncodeBuffer(char *,char *,int);
  195. NoMangle int  DLL_IMPORT_EXPORT  seeEncodeUTF8(int,char *);
  196. NoMangle int  DLL_IMPORT_EXPORT  seeErrorText(int,int,char *,int);
  197. NoMangle int  DLL_IMPORT_EXPORT  seeExtractLine(char *,int,char *,int);
  198. NoMangle int  DLL_IMPORT_EXPORT  seeExtractText(char *,char *,char *,int);
  199. NoMangle int  DLL_IMPORT_EXPORT  seeForwardEmail(int,char *,char *,char *,char *,char *,char *);
  200. NoMangle int  DLL_IMPORT_EXPORT  seeGetEmailCount(int);
  201. NoMangle int  DLL_IMPORT_EXPORT  seeGetEmailFile(int,int,char *,char *,char *);
  202. NoMangle int  DLL_IMPORT_EXPORT  seeGetEmailLines(int,int,int,char *,int);
  203. NoMangle unsigned DLL_IMPORT_EXPORT  seeGetEmailSize(int,int);
  204. NoMangle int  DLL_IMPORT_EXPORT  seeGetEmailUID(int,int,char *,int);
  205. NoMangle unsigned DLL_IMPORT_EXPORT seeGetTicks(int);
  206. NoMangle int  DLL_IMPORT_EXPORT  seeImapConnect(int,char *,char *,char *);
  207. NoMangle int  DLL_IMPORT_EXPORT  seeImapCopyMBmail(int,int,char *);
  208. NoMangle int  DLL_IMPORT_EXPORT  seeImapCreateMB(int,char *);
  209. NoMangle int  DLL_IMPORT_EXPORT  seeImapDeleteMB(int,char *);
  210. NoMangle int  DLL_IMPORT_EXPORT  seeImapFlags(int,int,int,int);
  211. NoMangle int  DLL_IMPORT_EXPORT  seeImapListMB(int,char *,int);
  212. NoMangle int  DLL_IMPORT_EXPORT  seeImapMsgNumber(int,int);
  213. NoMangle int  DLL_IMPORT_EXPORT  seeImapRenameMB(int,char *,char *);
  214. NoMangle int  DLL_IMPORT_EXPORT  seeImapSearch(int,char *,char *,int);
  215. NoMangle int  DLL_IMPORT_EXPORT  seeImapSelectMB(int,char *);
  216. NoMangle int  DLL_IMPORT_EXPORT  seeImapSource(int,char *);
  217. NoMangle int  DLL_IMPORT_EXPORT  seeIntegerParam(int,int,unsigned);
  218. NoMangle int  DLL_IMPORT_EXPORT  seeKillProgram(unsigned,int);
  219. NoMangle int  DLL_IMPORT_EXPORT  seePop3Connect(int,char *,char *,char *);
  220. NoMangle int  DLL_IMPORT_EXPORT  seePop3Source(int,char *);
  221. NoMangle int  DLL_IMPORT_EXPORT  seeQuoteBuffer(char *,char *,int);
  222. NoMangle int  DLL_IMPORT_EXPORT  seeReadQuoted(char *,char *,int,int);
  223. NoMangle int  DLL_IMPORT_EXPORT  seeRelease(void);
  224. NoMangle int  DLL_IMPORT_EXPORT  seeSendEmail(int,char *,char *,char *,char *,char *,char *);
  225. NoMangle int  DLL_IMPORT_EXPORT  seeSendHTML(int,char *,char *,char *,char *,char *,char *,char *,char *);
  226. NoMangle int  DLL_IMPORT_EXPORT  seeSetErrorText(int, char *);
  227. NoMangle int  DLL_IMPORT_EXPORT  seeShortToByte(char *);
  228. NoMangle int  DLL_IMPORT_EXPORT  seeSleep(int);
  229. NoMangle int  DLL_IMPORT_EXPORT  seeSmtpConnect(int,char *,char *,char *);
  230. NoMangle int  DLL_IMPORT_EXPORT  seeSmtpTarget(int,char *,char *,char *);
  231. NoMangle unsigned DLL_IMPORT_EXPORT seeStartProgram(char *);
  232. NoMangle unsigned DLL_IMPORT_EXPORT seeStatistics(int,int);
  233. NoMangle int  DLL_IMPORT_EXPORT  seeStringParam(int,int,char *);
  234. NoMangle int  DLL_IMPORT_EXPORT  seeTestFileSet(int, char *,char *,int);
  235. NoMangle int  DLL_IMPORT_EXPORT  seeVerifyFormat(char *);
  236. NoMangle int  DLL_IMPORT_EXPORT  seeVerifyUser(int,char *);