Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/ttplug.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4089 - (hide annotations) (download) (as text)
Tue Sep 7 03:42:35 2010 UTC (13 years, 7 months ago) by doda
File MIME type: text/x-chdr
File size: 5753 byte(s)
WSAAsyncGetAddrInfo を TTX からフックできるようにした。

1 maya 3227 #ifndef __TTPLUG_H
2     #define __TTPLUG_H
3    
4     #ifdef __cplusplus
5     extern "C" {
6     #endif
7    
8     #include "ttplugin.h"
9    
10     /* This function initializes the extensions and is called at the beginning
11     of the program. */
12     void PASCAL FAR TTXInit(PTTSet ts, PComVar cv);
13    
14     /* This function is called when a TCP connection is about to be opened.
15     This macro stuff is to make sure that the functions in the caller's
16     EXE or DLL are hooked. */
17     void PASCAL FAR TTXInternalOpenTCP(TTXSockHooks FAR * hooks);
18     #define TTXOpenTCP() \
19     do { \
20     static TTXSockHooks SockHooks = { \
21     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
22     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
23     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
24 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
25     &PWSAAsyncGetAddrInfo \
26 maya 3227 }; \
27     TTXInternalOpenTCP(&SockHooks); \
28     } while (0)
29    
30     /* This function is called when a TCP connection has been closed.
31     This macro stuff is to make sure that the functions in the caller's
32     EXE or DLL are hooked. */
33     void PASCAL FAR TTXInternalCloseTCP(TTXSockHooks FAR * hooks);
34     #define TTXCloseTCP() \
35     do { \
36     static TTXSockHooks SockHooks = { \
37     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
38     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
39     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
40 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
41     &PWSAAsyncGetAddrInfo \
42 maya 3227 }; \
43     TTXInternalCloseTCP(&SockHooks); \
44     } while (0)
45    
46     void PASCAL FAR TTXInternalOpenFile(TTXFileHooks FAR * hooks);
47     #define TTXOpenFile() \
48     do { \
49     static TTXFileHooks FileHooks = { \
50     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
51     }; \
52     TTXInternalOpenFile(&FileHooks); \
53     } while (0)
54    
55     void PASCAL FAR TTXInternalCloseFile(TTXFileHooks FAR * hooks);
56     #define TTXCloseFile() \
57     do { \
58     static TTXFileHooks FileHooks = { \
59     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
60     }; \
61     TTXInternalCloseFile(&FileHooks); \
62     } while (0)
63    
64     /* This function is called after the TTDLG DLL has been loaded.
65     This macro stuff is to make sure that the functions in the caller's
66     EXE or DLL are hooked. */
67     void PASCAL FAR TTXInternalGetUIHooks(TTXUIHooks FAR * hooks);
68     #define TTXGetUIHooks() \
69     do { \
70     static TTXUIHooks UIHooks = { \
71     &SetupTerminal, &SetupWin, &SetupKeyboard, &SetupSerialPort, \
72     &SetupTCPIP, &GetHostName, &ChangeDirectory, &AboutDialog, \
73     &ChooseFontDlg, &SetupGeneral, &WindowWindow \
74     }; \
75     TTXInternalGetUIHooks(&UIHooks); \
76     } while (0)
77    
78     /* This function is called after the TTSET DLL has been loaded.
79     This macro stuff is to make sure that the functions in the caller's
80     EXE or DLL are hooked. */
81     void PASCAL FAR TTXInternalGetSetupHooks(TTXSetupHooks FAR * hooks);
82     #define TTXGetSetupHooks() \
83     do { \
84     static TTXSetupHooks SetupHooks = { \
85     &ReadIniFile, &WriteIniFile, &ReadKeyboardCnf, &CopyHostList, \
86     &AddHostToList, &ParseParam \
87     }; \
88     TTXInternalGetSetupHooks(&SetupHooks); \
89     } while (0)
90    
91     /* This function is called when the window size has changed. */
92     void PASCAL FAR TTXSetWinSize(int rows, int cols);
93    
94     /* This function adds the extensions' entries to the menu, which is the
95     handle for the program's menubar. */
96     void PASCAL FAR TTXModifyMenu(HMENU menu);
97    
98     /* This function is called when a popup menu is about to be displayed.
99     The status of the entries is set appropriately. */
100     void PASCAL FAR TTXModifyPopupMenu(HMENU menu);
101    
102     /* This function calls on the extensions to handle a command. It returns
103     TRUE if they handle it, otherwise FALSE. */
104     BOOL PASCAL FAR TTXProcessCommand(HWND hWin, WORD cmd);
105    
106     /* This function is called to see whether Telnet mode can be turned on when
107     Tera Term thinks it has detected a telnetd */
108     void PASCAL FAR TTXEnd(void);
109    
110     /* This function is called when a new Tera Term is being started with certain
111     settings and the extension may wish to add some options to the command line */
112     void PASCAL FAR TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec);
113     #ifdef __cplusplus
114     }
115     #endif
116    
117     #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26