[Ttssh2-commit] [8279] ttpfile.dllのSerialPortConfconvertId2Str()のexport方法を変更

scmno****@osdn***** scmno****@osdn*****
2019年 10月 8日 (火) 23:38:32 JST


Revision: 8279
          https://osdn.net/projects/ttssh2/scm/svn/commits/8279
Author:   zmatsuo
Date:     2019-10-08 23:38:32 +0900 (Tue, 08 Oct 2019)
Log Message:
-----------
ttpfile.dllのSerialPortConfconvertId2Str()のexport方法を変更

- プロトタイプを正しく認識できるよう ttpset/ttset.h を追加
  - teraterm/ttsetup.h から inlucde
- __declspec(dllimport)を使用するようにした

Modified Paths:
--------------
    trunk/teraterm/teraterm/ttsetup.h
    trunk/teraterm/ttpset/ttpset.def
    trunk/teraterm/ttpset/ttset.c

Added Paths:
-----------
    trunk/teraterm/ttpset/ttset.h

-------------- next part --------------
Modified: trunk/teraterm/teraterm/ttsetup.h
===================================================================
--- trunk/teraterm/teraterm/ttsetup.h	2019-10-08 13:58:45 UTC (rev 8278)
+++ trunk/teraterm/teraterm/ttsetup.h	2019-10-08 14:38:32 UTC (rev 8279)
@@ -27,6 +27,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#pragma once
+
 #include "ttlib.h"
 
 /* TERATERM.EXE, TTSET interface */
@@ -64,8 +66,8 @@
 BOOL LoadTTSET();
 void FreeTTSET();
 
-int PASCAL SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen);
-
 #ifdef __cplusplus
 }
 #endif
+
+#include "../ttpset/ttset.h"

Modified: trunk/teraterm/ttpset/ttpset.def
===================================================================
--- trunk/teraterm/ttpset/ttpset.def	2019-10-08 13:58:45 UTC (rev 8278)
+++ trunk/teraterm/ttpset/ttpset.def	2019-10-08 14:38:32 UTC (rev 8279)
@@ -7,4 +7,3 @@
   ParseParam @6
   CopySerialList @7
   AddValueToList @8
-  SerialPortConfconvertId2Str @9

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2019-10-08 13:58:45 UTC (rev 8278)
+++ trunk/teraterm/ttpset/ttset.c	2019-10-08 14:38:32 UTC (rev 8279)
@@ -44,6 +44,9 @@
 
 #include "compat_w95.h"
 
+#define DllExport __declspec(dllexport)
+#include "ttset.h"
+
 #ifndef CLEARTYPE_QUALITY
 #define CLEARTYPE_QUALITY 5
 #endif
@@ -111,7 +114,7 @@
  *    TRUE: \x95ϊ\xB7\x90\xAC\x8C\xF7
  *    FALSE: \x95ϊ\xB7\x8E\xB8\x94s
  */
-int PASCAL SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen)
+int WINAPI SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen)
 {
 	id_str_pair_t *conf;
 	int ret = FALSE;

Added: trunk/teraterm/ttpset/ttset.h
===================================================================
--- trunk/teraterm/ttpset/ttset.h	                        (rev 0)
+++ trunk/teraterm/ttpset/ttset.h	2019-10-08 14:38:32 UTC (rev 8279)
@@ -0,0 +1,15 @@
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(DllExport)
+#define DllExport __declspec(dllimport)
+#endif
+
+DllExport int WINAPI SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen);
+
+#ifdef __cplusplus
+}
+#endif


Ttssh2-commit メーリングリストの案内