Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/clipboar.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3685 - (hide annotations) (download) (as text)
Mon Nov 16 17:30:12 2009 UTC (14 years, 4 months ago) by doda
File MIME type: text/x-csrc
File size: 15283 byte(s)
PasteDelayPerLineの値が大きい時に表示が遅れる事への暫定対処。

1 maya 3227 /* Tera Term
2     Copyright(C) 1994-1998 T. Teranishi
3     All rights reserved. */
4    
5     /* TERATERM.EXE, Clipboard routines */
6     #include "teraterm.h"
7     #include "tttypes.h"
8     #include "vtdisp.h"
9     #include <string.h>
10     #include <stdlib.h>
11     #include <stdio.h>
12 yutakapon 3635 #include <commctrl.h>
13 maya 3227
14     #include "ttwinman.h"
15     #include "ttcommon.h"
16    
17     #include "clipboar.h"
18     #include "tt_res.h"
19    
20     // for clipboard copy
21     static HGLOBAL CBCopyHandle = NULL;
22     static PCHAR CBCopyPtr = NULL;
23    
24     // for clipboard paste
25     static HGLOBAL CBMemHandle = NULL;
26     static PCHAR CBMemPtr = NULL;
27     static LONG CBMemPtr2 = 0;
28     static BOOL CBAddCR = FALSE;
29     static BYTE CBByte;
30     static BOOL CBRetrySend;
31     static BOOL CBRetryEcho;
32     static BOOL CBSendCR;
33     static BOOL CBDDE;
34    
35     static HFONT DlgClipboardFont;
36    
37     PCHAR CBOpen(LONG MemSize)
38     {
39 maya 3393 if (MemSize==0) {
40     return (NULL);
41     }
42     if (CBCopyHandle!=NULL) {
43     return (NULL);
44     }
45     CBCopyPtr = NULL;
46     CBCopyHandle = GlobalAlloc(GMEM_MOVEABLE, MemSize);
47     if (CBCopyHandle == NULL) {
48     MessageBeep(0);
49     }
50     else {
51     CBCopyPtr = GlobalLock(CBCopyHandle);
52     if (CBCopyPtr == NULL) {
53     GlobalFree(CBCopyHandle);
54     CBCopyHandle = NULL;
55     MessageBeep(0);
56     }
57     }
58     return (CBCopyPtr);
59 maya 3227 }
60    
61     void CBClose()
62     {
63 maya 3393 BOOL Empty;
64     if (CBCopyHandle==NULL) {
65     return;
66     }
67 maya 3227
68 maya 3393 Empty = FALSE;
69     if (CBCopyPtr!=NULL) {
70     Empty = (CBCopyPtr[0]==0);
71     }
72 maya 3227
73 maya 3393 GlobalUnlock(CBCopyHandle);
74     CBCopyPtr = NULL;
75 maya 3227
76 maya 3393 if (OpenClipboard(HVTWin)) {
77     EmptyClipboard();
78     if (! Empty) {
79     SetClipboardData(CF_TEXT, CBCopyHandle);
80     }
81     CloseClipboard();
82     }
83     CBCopyHandle = NULL;
84 maya 3227 }
85    
86     void CBStartPaste(HWND HWin, BOOL AddCR,
87 maya 3393 int BuffSize, PCHAR DataPtr, int DataSize)
88 maya 3227 //
89     // DataPtr and DataSize are used only for DDE
90     // For clipboard, BuffSize should be 0
91     // DataSize should be <= BuffSize
92     {
93 maya 3393 UINT Cf;
94 maya 3227
95 maya 3393 if (! cv.Ready) {
96     return;
97     }
98     if (TalkStatus!=IdTalkKeyb) {
99     return;
100     }
101 maya 3227
102 maya 3393 CBAddCR = AddCR;
103 maya 3227
104 maya 3393 if (BuffSize==0) { // for clipboar
105     if (IsClipboardFormatAvailable(CF_TEXT)) {
106     Cf = CF_TEXT;
107     }
108     else if (IsClipboardFormatAvailable(CF_OEMTEXT)) {
109     Cf = CF_OEMTEXT;
110     }
111     else {
112     return;
113     }
114     }
115 maya 3227
116 maya 3393 CBMemHandle = NULL;
117     CBMemPtr = NULL;
118     CBMemPtr2 = 0;
119     CBDDE = FALSE;
120     if (BuffSize==0) { //clipboard
121     if (OpenClipboard(HWin)) {
122     CBMemHandle = GetClipboardData(Cf);
123     }
124     if (CBMemHandle!=NULL) {
125     TalkStatus=IdTalkCB;
126     }
127     }
128     else { // dde
129     CBMemHandle = GlobalAlloc(GHND,BuffSize);
130     if (CBMemHandle != NULL) {
131     CBDDE = TRUE;
132     CBMemPtr = GlobalLock(CBMemHandle);
133     if (CBMemPtr != NULL) {
134     memcpy(CBMemPtr,DataPtr,DataSize);
135     GlobalUnlock(CBMemHandle);
136     CBMemPtr=NULL;
137     TalkStatus=IdTalkCB;
138     }
139     }
140     }
141     CBRetrySend = FALSE;
142     CBRetryEcho = FALSE;
143     CBSendCR = FALSE;
144     if (TalkStatus != IdTalkCB) {
145     CBEndPaste();
146     }
147 maya 3227 }
148    
149     // �����������N���b�v�{�[�h������DDE�f�[�^���[�������������B
150     //
151     // CBMemHandle�n���h�����O���[�o�������������A�����������I�������������A
152     // �����N���b�v�{�[�h������DDE�f�[�^�������������������������i�j�����������\�������j�B
153     // �����A�f�[�^���� null-terminate �����������������O�����������������A�������f�[�^����
154     // �����������B
155     // (2006.11.6 yutaka)
156     void CBSend()
157     {
158 maya 3393 int c;
159     BOOL EndFlag;
160 maya 3227
161 maya 3393 if (CBMemHandle==NULL) {
162     return;
163     }
164 maya 3227
165 maya 3393 if (CBRetrySend) {
166     CBRetryEcho = (ts.LocalEcho>0);
167     c = CommTextOut(&cv,(PCHAR)&CBByte,1);
168     CBRetrySend = (c==0);
169     if (CBRetrySend) {
170     return;
171     }
172     }
173 maya 3227
174 maya 3393 if (CBRetryEcho) {
175     c = CommTextEcho(&cv,(PCHAR)&CBByte,1);
176     CBRetryEcho = (c==0);
177     if (CBRetryEcho) {
178     return;
179     }
180     }
181 maya 3227
182 maya 3393 CBMemPtr = GlobalLock(CBMemHandle);
183     if (CBMemPtr==NULL) {
184     return;
185     }
186 maya 3227
187 maya 3393 do {
188     if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a)) {
189     CBMemPtr2++;
190     // added PasteDelayPerLine (2009.4.12 maya)
191     Sleep(ts.PasteDelayPerLine);
192 doda 3685 CBSendCR = FALSE;
193     break;
194 maya 3393 }
195    
196     EndFlag = (CBMemPtr[CBMemPtr2]==0);
197     if (! EndFlag) {
198     CBByte = CBMemPtr[CBMemPtr2];
199     CBMemPtr2++;
200 maya 3227 // Decoding characters which are encoded by MACRO
201     // to support NUL character sending
202     //
203     // [encoded character] --> [decoded character]
204     // 01 01 --> 00
205     // 01 02 --> 01
206 maya 3393 if (CBByte==0x01) { /* 0x01 from MACRO */
207     CBByte = CBMemPtr[CBMemPtr2];
208     CBMemPtr2++;
209     CBByte = CBByte - 1; // character just after 0x01
210     }
211     }
212     else if (CBAddCR) {
213     EndFlag = FALSE;
214     CBAddCR = FALSE;
215     CBByte = 0x0d;
216     }
217     else {
218     CBEndPaste();
219     return;
220     }
221 maya 3227
222 maya 3393 if (! EndFlag) {
223     c = CommTextOut(&cv,(PCHAR)&CBByte,1);
224     CBSendCR = (CBByte==0x0D);
225     CBRetrySend = (c==0);
226     if ((! CBRetrySend) &&
227     (ts.LocalEcho>0)) {
228     c = CommTextEcho(&cv,(PCHAR)&CBByte,1);
229     CBRetryEcho = (c==0);
230     }
231     }
232     else {
233     c=0;
234     }
235     }
236     while (c>0);
237 maya 3227
238 maya 3393 if (CBMemPtr!=NULL) {
239     GlobalUnlock(CBMemHandle);
240     CBMemPtr=NULL;
241     }
242 maya 3227 }
243    
244     void CBEndPaste()
245     {
246 maya 3393 TalkStatus = IdTalkKeyb;
247 maya 3227
248 maya 3393 if (CBMemHandle!=NULL) {
249     if (CBMemPtr!=NULL) {
250     GlobalUnlock(CBMemHandle);
251     }
252     if (CBDDE) {
253     GlobalFree(CBMemHandle);
254     }
255     }
256     if (!CBDDE) {
257     CloseClipboard();
258     }
259 maya 3227
260 maya 3393 CBDDE = FALSE;
261     CBMemHandle = NULL;
262     CBMemPtr = NULL;
263     CBMemPtr2 = 0;
264     CBAddCR = FALSE;
265 maya 3227 }
266    
267    
268     static char *ClipboardPtr = NULL;
269     static int PasteCanceled = 0;
270    
271     static LRESULT CALLBACK OnClipboardDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp)
272     {
273     LOGFONT logfont;
274     HFONT font;
275     char uimsg[MAX_UIMSG];
276     //char *p;
277     POINT p;
278     RECT rc_dsk, rc_dlg;
279     int dlg_height, dlg_width;
280     OSVERSIONINFO osvi;
281     static int ok2right, info2bottom, edit2ok, edit2info;
282     RECT rc_edit, rc_ok, rc_cancel, rc_info;
283 yutakapon 3635 // for status bar
284     static HWND hStatus = NULL;
285 maya 3641 static init_width, init_height;
286 maya 3227
287     switch (msg) {
288     case WM_INITDIALOG:
289     #if 0
290     for (p = ClipboardPtr; *p ; p++) {
291     char buf[20];
292     _snprintf_s(buf, sizeof(buf), _TRUNCATE, "%02x ", *p);
293     OutputDebugString(buf);
294     }
295     #endif
296    
297     font = (HFONT)SendMessage(hDlgWnd, WM_GETFONT, 0, 0);
298     GetObject(font, sizeof(LOGFONT), &logfont);
299     if (get_lang_font("DLG_TAHOMA_FONT", hDlgWnd, &logfont, &DlgClipboardFont, ts.UILanguageFile)) {
300     SendDlgItemMessage(hDlgWnd, IDC_EDIT, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
301     SendDlgItemMessage(hDlgWnd, IDC_CLIPBOARD_INFO, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
302     SendDlgItemMessage(hDlgWnd, IDOK, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
303     SendDlgItemMessage(hDlgWnd, IDCANCEL, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
304     }
305     else {
306     DlgClipboardFont = NULL;
307     }
308    
309     GetWindowText(hDlgWnd, uimsg, sizeof(uimsg));
310     get_lang_msg("DLG_CLIPBOARD_TITLE", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
311     SetWindowText(hDlgWnd, ts.UIMsg);
312     GetDlgItemText(hDlgWnd, IDC_CLIPBOARD_INFO, uimsg, sizeof(uimsg));
313     get_lang_msg("DLG_CLIPBOARD_INFO", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
314     SetDlgItemText(hDlgWnd, IDC_CLIPBOARD_INFO, ts.UIMsg);
315     GetDlgItemText(hDlgWnd, IDCANCEL, uimsg, sizeof(uimsg));
316     get_lang_msg("BTN_CANCEL", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
317     SetDlgItemText(hDlgWnd, IDCANCEL, ts.UIMsg);
318     GetDlgItemText(hDlgWnd, IDOK, uimsg, sizeof(uimsg));
319     get_lang_msg("BTN_OK", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
320     SetDlgItemText(hDlgWnd, IDOK, ts.UIMsg);
321    
322     SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT), WM_SETTEXT, 0, (LPARAM)ClipboardPtr);
323    
324     DispConvScreenToWin(CursorX, CursorY, &p.x, &p.y);
325     ClientToScreen(HVTWin, &p);
326    
327     // �L�����b�g���������������o���������������\���t����������
328     // �m�F�E�C���h�E�����������������\���������������������B
329     // �E�C���h�E���������o������������������ (2008.4.24 maya)
330     osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
331     GetVersionEx(&osvi);
332 maya 3509 if ( (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion == 4) ||
333     (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS && osvi.dwMinorVersion < 10) ) {
334     // NT4.0, 95 ���}���`���j�^API��������
335 maya 3227 SystemParametersInfo(SPI_GETWORKAREA, 0, &rc_dsk, 0);
336     }
337     else {
338     HMONITOR hm;
339     POINT pt;
340     MONITORINFO mi;
341    
342     pt.x = p.x;
343     pt.y = p.y;
344     hm = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);
345    
346     mi.cbSize = sizeof(MONITORINFO);
347     GetMonitorInfo(hm, &mi);
348     rc_dsk = mi.rcWork;
349     }
350     GetWindowRect(hDlgWnd, &rc_dlg);
351     dlg_height = rc_dlg.bottom-rc_dlg.top;
352     dlg_width = rc_dlg.right-rc_dlg.left;
353     if (p.y < rc_dsk.top) {
354     p.y = rc_dsk.top;
355     }
356     else if (p.y + dlg_height > rc_dsk.bottom) {
357     p.y = rc_dsk.bottom - dlg_height;
358     }
359     if (p.x < rc_dsk.left) {
360     p.x = rc_dsk.left;
361     }
362     else if (p.x + dlg_width > rc_dsk.right) {
363     p.x = rc_dsk.right - dlg_width;
364     }
365    
366     SetWindowPos(hDlgWnd, NULL, p.x, p.y,
367     0, 0, SWP_NOSIZE | SWP_NOZORDER);
368    
369 maya 3641 // �_�C�A���O�������T�C�Y������
370     GetWindowRect(hDlgWnd, &rc_dlg);
371     init_width = rc_dlg.right - rc_dlg.left;
372     init_height = rc_dlg.bottom - rc_dlg.top;
373    
374 maya 3227 // �����T�C�Y�����K�v���l���v�Z
375     GetClientRect(hDlgWnd, &rc_dlg);
376     GetWindowRect(GetDlgItem(hDlgWnd, IDC_EDIT), &rc_edit);
377     GetWindowRect(GetDlgItem(hDlgWnd, IDOK), &rc_ok);
378     GetWindowRect(GetDlgItem(hDlgWnd, IDC_CLIPBOARD_INFO), &rc_info);
379    
380     p.x = rc_dlg.right;
381     p.y = rc_dlg.bottom;
382     ClientToScreen(hDlgWnd, &p);
383     ok2right = p.x - rc_ok.left;
384     info2bottom = p.y - rc_info.top;
385     edit2ok = rc_ok.left - rc_edit.right;
386     edit2info = rc_info.top - rc_edit.bottom;
387    
388     // �T�C�Y������
389     SetWindowPos(hDlgWnd, NULL, 0, 0,
390     ts.PasteDialogSize.cx, ts.PasteDialogSize.cy,
391     SWP_NOZORDER | SWP_NOMOVE);
392    
393 yutakapon 3635 // ���T�C�Y�A�C�R�����E�����\���������������A�X�e�[�^�X�o�[���t�����B
394     InitCommonControls();
395     hStatus = CreateStatusWindow(
396     WS_CHILD | WS_VISIBLE |
397     CCS_BOTTOM | SBARS_SIZEGRIP, NULL, hDlgWnd, 1);
398    
399 maya 3227 return TRUE;
400    
401     case WM_COMMAND:
402     switch (LOWORD(wp)) {
403     case IDOK:
404     {
405     int len = SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT), WM_GETTEXTLENGTH, 0, 0);
406     HGLOBAL hMem;
407     char *buf;
408    
409     hMem = GlobalAlloc(GMEM_MOVEABLE, len + 1);
410     buf = GlobalLock(hMem);
411     SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT), WM_GETTEXT, len + 1, (LPARAM)buf);
412     GlobalUnlock(hMem);
413    
414     EmptyClipboard();
415     SetClipboardData(CF_TEXT, hMem);
416    
417     // hMem���N���b�v�{�[�h�������������������A�j�����������������B
418    
419     if (DlgClipboardFont != NULL) {
420     DeleteObject(DlgClipboardFont);
421     }
422    
423 yutakapon 3635 DestroyWindow(hStatus);
424 maya 3227 EndDialog(hDlgWnd, IDOK);
425     }
426     break;
427    
428     case IDCANCEL:
429     PasteCanceled = 1;
430    
431     if (DlgClipboardFont != NULL) {
432     DeleteObject(DlgClipboardFont);
433     }
434    
435 yutakapon 3635 DestroyWindow(hStatus);
436 maya 3227 EndDialog(hDlgWnd, IDCANCEL);
437     break;
438    
439     default:
440     return FALSE;
441     }
442    
443     #if 0
444     case WM_CLOSE:
445     PasteCanceled = 1;
446     EndDialog(hDlgWnd, 0);
447     return TRUE;
448     #endif
449    
450     case WM_SIZE:
451     {
452     // ���z�u
453     POINT p;
454     int dlg_w, dlg_h;
455    
456     GetClientRect(hDlgWnd, &rc_dlg);
457     dlg_w = rc_dlg.right;
458     dlg_h = rc_dlg.bottom;
459    
460     GetWindowRect(GetDlgItem(hDlgWnd, IDC_EDIT), &rc_edit);
461     GetWindowRect(GetDlgItem(hDlgWnd, IDOK), &rc_ok);
462     GetWindowRect(GetDlgItem(hDlgWnd, IDCANCEL), &rc_cancel);
463     GetWindowRect(GetDlgItem(hDlgWnd, IDC_CLIPBOARD_INFO), &rc_info);
464    
465     // OK
466     p.x = rc_ok.left;
467     p.y = rc_ok.top;
468     ScreenToClient(hDlgWnd, &p);
469     SetWindowPos(GetDlgItem(hDlgWnd, IDOK), 0,
470     dlg_w - ok2right, p.y, 0, 0,
471     SWP_NOSIZE | SWP_NOZORDER);
472    
473     // CANCEL
474     p.x = rc_cancel.left;
475     p.y = rc_cancel.top;
476     ScreenToClient(hDlgWnd, &p);
477     SetWindowPos(GetDlgItem(hDlgWnd, IDCANCEL), 0,
478     dlg_w - ok2right, p.y, 0, 0,
479     SWP_NOSIZE | SWP_NOZORDER);
480    
481     // INFO
482     p.x = rc_info.left;
483     p.y = rc_info.top;
484     ScreenToClient(hDlgWnd, &p);
485     SetWindowPos(GetDlgItem(hDlgWnd, IDC_CLIPBOARD_INFO), 0,
486     p.x, dlg_h - info2bottom, 0, 0,
487     SWP_NOSIZE | SWP_NOZORDER);
488    
489     // EDIT
490     p.x = rc_edit.left;
491     p.y = rc_edit.top;
492     ScreenToClient(hDlgWnd, &p);
493     SetWindowPos(GetDlgItem(hDlgWnd, IDC_EDIT), 0,
494     0, 0, dlg_w - p.x - edit2ok - ok2right, dlg_h - p.y - edit2info - info2bottom,
495     SWP_NOMOVE | SWP_NOZORDER);
496    
497     // �T�C�Y������
498     GetWindowRect(hDlgWnd, &rc_dlg);
499     ts.PasteDialogSize.cx = rc_dlg.right - rc_dlg.left;
500     ts.PasteDialogSize.cy = rc_dlg.bottom - rc_dlg.top;
501 yutakapon 3635
502     // status bar
503     SendMessage(hStatus , msg , wp , lp);
504 maya 3227 }
505     return TRUE;
506    
507 maya 3641 case WM_GETMINMAXINFO:
508     {
509     // �_�C�A���O�������T�C�Y����������������������������
510     LPMINMAXINFO lpmmi;
511     lpmmi = (LPMINMAXINFO)lp;
512     lpmmi->ptMinTrackSize.x = init_width;
513     lpmmi->ptMinTrackSize.y = init_height;
514     }
515     return FALSE;
516    
517 maya 3227 default:
518     return FALSE;
519     }
520     return TRUE;
521     }
522    
523 yutakapon 3535 // �t�@�C�������`���������������Atext���������������������B
524     static int search_clipboard(char *filename, char *text)
525     {
526     int ret = 0; // no hit
527     FILE *fp = NULL;
528     char buf[256];
529     int len;
530    
531     if (filename == NULL || filename[0] == '\0')
532     goto error;
533    
534     fp = fopen(filename, "r");
535     if (fp == NULL)
536     goto error;
537    
538     // TODO: ���s��256byte�������������������l��
539     while (fgets(buf, sizeof(buf), fp) != NULL) {
540     len = strlen(buf);
541     if (buf[len - 1] == '\n')
542     buf[len - 1] = '\0';
543     if (buf[0] == '\0')
544     continue;
545     if (strstr(text, buf)) { // hit
546     ret = 1;
547     break;
548     }
549     }
550    
551     error:
552     if (fp)
553     fclose(fp);
554    
555     return (ret);
556     }
557    
558    
559 maya 3227 //
560     // �N���b�v�{�[�h�����s�R�[�h�����������������A�m�F�_�C�A���O���\�������B
561     // �N���b�v�{�[�h�����X�����\�B
562     //
563     // return 0: Cancel
564     // 1: Paste OK
565     //
566     // (2008.2.3 yutaka)
567     //
568     int CBStartPasteConfirmChange(HWND HWin)
569     {
570     UINT Cf;
571     HANDLE hText;
572     char *pText;
573     int pos;
574     int ret = 0;
575 yutakapon 3535 int confirm = 0;
576 maya 3227
577     if (ts.ConfirmChangePaste == 0)
578     return 1;
579    
580     if (! cv.Ready)
581     goto error;
582     if (TalkStatus!=IdTalkKeyb)
583     goto error;
584    
585     if (IsClipboardFormatAvailable(CF_TEXT))
586     Cf = CF_TEXT;
587     else if (IsClipboardFormatAvailable(CF_OEMTEXT))
588     Cf = CF_OEMTEXT;
589     else
590     goto error;
591    
592     if (!OpenClipboard(HWin))
593     goto error;
594    
595     hText = GetClipboardData(Cf);
596    
597     if (hText != NULL) {
598     pText = (char *)GlobalLock(hText);
599     pos = strcspn(pText, "\r\n"); // ���s����������������
600     if (pText[pos] != '\0') {
601 yutakapon 3535 confirm = 1;
602    
603     } else {
604     // �������T�[�`����
605     if (search_clipboard(ts.ConfirmChangePasteStringFile, pText)) {
606     confirm = 1;
607     }
608    
609     }
610    
611     if (confirm) {
612 maya 3227 ClipboardPtr = pText;
613     PasteCanceled = 0;
614     ret = DialogBox(hInst, MAKEINTRESOURCE(IDD_CLIPBOARD_DIALOG),
615     HVTWin, (DLGPROC)OnClipboardDlgProc);
616     if (ret == 0 || ret == -1) {
617     ret = GetLastError();
618     }
619    
620     if (PasteCanceled) {
621     ret = 0;
622     GlobalUnlock(hText);
623     CloseClipboard();
624     goto error;
625     }
626    
627     }
628    
629     ret = 1;
630    
631     GlobalUnlock(hText);
632     }
633    
634     CloseClipboard();
635    
636     error:
637     return (ret);
638     }

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