-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathTeamTalkInterop.cs
More file actions
796 lines (766 loc) · 62.9 KB
/
TeamTalkInterop.cs
File metadata and controls
796 lines (766 loc) · 62.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
/*
* Copyright (c) 2005-2018, BearWare.dk
*
* Contact Information:
*
* Bjoern D. Rasmussen
* Kirketoften 5
* DK-8260 Viby J
* Denmark
* Email: contact@bearware.dk
* Phone: +45 20 20 54 59
* Web: http://www.bearware.dk
*
* This source code is part of the TeamTalk SDK owned by
* BearWare.dk. Use of this file, or its compiled unit, requires a
* TeamTalk SDK License Key issued by BearWare.dk.
*
* The TeamTalk SDK License Agreement along with its Terms and
* Conditions are outlined in the file License.txt included with the
* TeamTalk SDK distribution.
*
*/
using System;
using System.Text;
#if PocketPC
using Microsoft.WindowsCE.Forms;
#endif
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace c_tt
{
#if PocketPC
class MyEventHandler : MessageWindow
#else
class MyEventHandler : System.Windows.Forms.UserControl
#endif
{
public const int WM_TEAMTALK_CLIENTEVENT = 0x8000 + 1; /* WM_APP */
public MyEventHandler(BearWare.TeamTalkBase tt)
{
m_tt = tt;
}
protected BearWare.TeamTalkBase m_tt;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_TEAMTALK_CLIENTEVENT)
{
BearWare.TTMessage msg = new BearWare.TTMessage();
if(m_tt.GetMessage(ref msg, 0))
m_tt.ProcessMsg(msg);
}
else
base.WndProc(ref m);
}
}
class TTDLL
{
#if ENABLE_TEAMTALKPRO
public const string dllname = "TeamTalk5Pro.dll";
public const string mgtdllname = "TeamTalk5Pro.NET.dll";
#else
public const string dllname = "TeamTalk5.dll";
public const string mgtdllname = "TeamTalk5.NET.dll";
#endif
public const int SIZEOF_TTMESSAGE_DATA = 6248;
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_GetVersion();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_InitTeamTalk(IntPtr hWnd, uint uMsg);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_InitTeamTalkPoll();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseTeamTalk(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetMessage(IntPtr lpTTInstance,
ref BearWare.TTMessage pMsg,
ref int pnWaitMs);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_PumpMessage(IntPtr lpTTInstance,
BearWare.ClientEvent nClientEvent,
int nIdentifier);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern BearWare.ClientFlag TT_GetFlags(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetLicenseInformation([MarshalAs(UnmanagedType.LPWStr)] string szRegName,
[MarshalAs(UnmanagedType.LPWStr)] string szRegKey);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetDefaultSoundDevices(ref int lpnInputDeviceID,
ref int lpnOutputDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetDefaultSoundDevicesEx(BearWare.SoundSystem nSoundSystem,
ref int lpnInputDeviceID,
ref int lpnOutputDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetSoundDevices([In, Out] BearWare.SoundDevice[] lpSoundDevices,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "TT_GetSoundDevices")] /* Windows CE NULL pointer workaround */
public static extern bool TT_GetSoundDevices_NULL(IntPtr lpSoundDevices,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_RestartSoundSystem();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID,
int nSampleRate, int nChannels,
bool bDuplexMode,
ref BearWare.SpeexDSP lpSpeexDSP);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_StartSoundLoopbackTestEx(int nInputDeviceID, int nOutputDeviceID,
int nSampleRate, int nChannels,
bool bDuplexMode,
ref BearWare.AudioPreprocessor lpAudioPreprocessor,
ref BearWare.SoundDeviceEffects lpSoundDeviceEffects);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseSoundLoopbackTest(IntPtr lpTTSoundLoop);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InitSoundInputDevice(IntPtr lpTTInstance,
int nInputDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InitSoundInputSharedDevice(int nSampleRate, int nChannels, int nFrameSize);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InitSoundOutputDevice(IntPtr lpTTInstance,
int nOutputDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InitSoundOutputSharedDevice(int nSampleRate, int nChannels, int nFrameSize);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InitSoundDuplexDevices(IntPtr lpTTInstance,
int nInputDeviceID,
int nOutputDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseSoundInputDevice(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseSoundOutputDevice(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseSoundDuplexDevices(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetSoundDeviceEffects(IntPtr lpTTInstance, ref BearWare.SoundDeviceEffects lpSoundDeviceEffect);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetSoundDeviceEffects(IntPtr lpTTInstance, ref BearWare.SoundDeviceEffects lpSoundDeviceEffect);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetSoundInputLevel(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetSoundInputGainLevel(IntPtr lpTTInstance,
int nLevel);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetSoundInputGainLevel(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetSoundInputPreprocess(IntPtr lpTTInstance, ref BearWare.SpeexDSP lpSpeexDSP);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetSoundInputPreprocess(IntPtr lpTTInstance, ref BearWare.SpeexDSP lpSpeexDSP);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetSoundInputPreprocessEx(IntPtr lpTTInstance, ref BearWare.AudioPreprocessor lpAudioPreprocessor);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetSoundInputPreprocessEx(IntPtr lpTTInstance, ref BearWare.AudioPreprocessor lpAudioPreprocessor);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetSoundOutputVolume(IntPtr lpTTInstance,
int nVolume);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetSoundOutputVolume(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetSoundOutputMute(IntPtr lpTTInstance,
bool bMuteAll);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Enable3DSoundPositioning(IntPtr lpTTInstance,
bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_AutoPositionUsers(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_EnableAudioBlockEvent(IntPtr lpTTInstance, int nUserID,
BearWare.StreamType nStreamType, bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_EnableAudioBlockEventEx(IntPtr lpTTInstance, int nUserID,
BearWare.StreamType nStreamType, ref BearWare.AudioFormat lpAudioFormat, bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InsertAudioBlock(IntPtr lpTTInstance, ref BearWare.AudioBlock lpAudioBlock);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_EnableVoiceTransmission(IntPtr lpTTInstance, bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_EnableVoiceActivation(IntPtr lpTTInstance,
bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetVoiceActivationLevel(IntPtr lpTTInstance,
int nLevel);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetVoiceActivationLevel(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetVoiceActivationStopDelay(IntPtr lpTTInstance,
int nDelayMSec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetVoiceActivationStopDelay(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StartRecordingMuxedAudioFile(IntPtr lpTTInstance,
ref BearWare.AudioCodec lpAudioCodec,
[MarshalAs(UnmanagedType.LPWStr)] string szAudioFileName,
BearWare.AudioFileFormat aff);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StartRecordingMuxedAudioFileEx(IntPtr lpTTInstance,
int nChannelID,
[MarshalAs(UnmanagedType.LPWStr)] string szAudioFileName,
BearWare.AudioFileFormat aff);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StartRecordingMuxedStreams(IntPtr lpTTInstance,
BearWare.StreamType uStreamTypes,
ref BearWare.AudioCodec lpAudioCodec,
[MarshalAs(UnmanagedType.LPWStr)] string szAudioFileName,
BearWare.AudioFileFormat aff);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StopRecordingMuxedAudioFile(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StopRecordingMuxedAudioFileEx(IntPtr lpTTInstance, int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StartVideoCaptureTransmission(IntPtr lpTTInstance, ref BearWare.VideoCodec lpVideoCodec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StopVideoCaptureTransmission(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "TT_GetVideoCaptureDevices")] /* Windows CE NULL pointer workaround */
public static extern bool TT_GetVideoCaptureDevices_NULL(IntPtr lpVideoDevices,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetVideoCaptureDevices([In, Out] BearWare.VideoCaptureDevice[] lpVideoDevices,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_InitVideoCaptureDevice(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szDeviceID,
ref BearWare.VideoFormat lpVideoFormat);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseVideoCaptureDevice(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_PaintVideoFrame(int nUserID, IntPtr hDC, int nPosX,
int nPosY, int nWidth, int nHeight, ref BearWare.VideoFrame lpVideoFrame);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_PaintVideoFrameEx(int nUserID, IntPtr hDC, int XDest,
int YDest, int nDestWidth, int nDestHeight,
int XSrc, int YSrc, int nSrcWidth, int nSrcHeight,
ref BearWare.VideoFrame lpVideoFrame);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern System.IntPtr TT_AcquireUserVideoCaptureFrame(IntPtr lpTTInstance, int nUserID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_ReleaseUserVideoCaptureFrame(IntPtr lpTTInstance, System.IntPtr lpVideoFrame);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StartStreamingMediaFileToChannel(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szMediaFilePath,
ref BearWare.VideoCodec lpVideoCodec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StartStreamingMediaFileToChannelEx(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szMediaFilePath,
ref BearWare.MediaFilePlayback lpMediaFilePlayback,
ref BearWare.VideoCodec lpVideoCodec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_UpdateStreamingMediaFileToChannel(IntPtr lpTTInstance,
ref BearWare.MediaFilePlayback lpMediaFilePlayback,
ref BearWare.VideoCodec lpVideoCodec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StopStreamingMediaFileToChannel(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_InitLocalPlayback(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szMediaFilePath,
ref BearWare.MediaFilePlayback lpMediaFilePlayback);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_UpdateLocalPlayback(IntPtr lpTTInstance, int nPlaybackSessionID,
ref BearWare.MediaFilePlayback lpMediaFilePlayback);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_StopLocalPlayback(IntPtr lpTTInstance, int nPlaybackSessionID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetMediaFileInfo([MarshalAs(UnmanagedType.LPWStr)] string szMediaFilePath,
ref BearWare.MediaFileInfo pMediaFileInfo);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern System.IntPtr TT_AcquireUserMediaVideoFrame(IntPtr lpTTInstance, int nUserID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_ReleaseUserMediaVideoFrame(IntPtr lpTTInstance, System.IntPtr lpVideoFrame);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_SendDesktopWindow(IntPtr lpTTInstance,
ref BearWare.DesktopWindow lpDesktopWindow,
BearWare.BitmapFormat nConvertBmpFormat);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CloseDesktopWindow(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_Palette_GetColorTable(BearWare.BitmapFormat nBmpPalette,
int nIndex);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_Windows_GetDesktopActiveHWND();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_Windows_GetDesktopHWND();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Windows_GetDesktopWindowHWND(int nIndex,
ref IntPtr lpHWnd);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Windows_GetWindow(IntPtr hWnd,
ref BearWare.ShareWindow lpShareWindow);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_SendDesktopWindowFromHWND(IntPtr lpTTInstance,
IntPtr hWnd,
BearWare.BitmapFormat nBitmapFormat,
BearWare.DesktopProtocol nDesktopProtocol);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_PaintDesktopWindow(IntPtr lpTTInstance,
int nUserID,
IntPtr hDC,
int XDest,
int YDest,
int nDestWidth,
int nDestHeight);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_PaintDesktopWindowEx(IntPtr lpTTInstance,
int nUserID,
IntPtr hDC,
int XDest,
int YDest,
int nDestWidth,
int nDestHeight,
int XSrc,
int YSrc,
int nSrcWidth,
int nSrcHeight);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SendDesktopCursorPosition(IntPtr lpTTInstance,
ushort nPosX,
ushort nPosY);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SendDesktopInput(IntPtr lpTTInstance,
int nUserID,
[In, Out] BearWare.DesktopInput[] lpDesktopInputs,
int nDesktopInputCount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_AcquireUserDesktopWindow(IntPtr lpTTInstance,
int nUserID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_AcquireUserDesktopWindowEx(IntPtr lpTTInstance,
int nUserID,
BearWare.BitmapFormat nBitmapFormat);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_ReleaseUserDesktopWindow(IntPtr lpTTInstance,
IntPtr lpDesktopWindow);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetEncryptionContext(IntPtr lpTTInstance,
ref BearWare.EncryptionContext lpEncryptionContext);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Connect(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szHostAddress,
int nTcpPort,
int nUdpPort,
int nLocalTcpPort,
int nLocalUdpPort,
bool bEncrypted);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_ConnectSysID(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szHostAddress,
int nTcpPort,
int nUdpPort,
int nLocalTcpPort,
int nLocalUdpPort,
bool bEncrypted,
[MarshalAs(UnmanagedType.LPWStr)] string szSystemID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_ConnectEx(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szHostAddress,
int nTcpPort,
int nUdpPort,
[MarshalAs(UnmanagedType.LPWStr)] string szBindIPAddr,
int nLocalTcpPort,
int nLocalUdpPort,
bool bEncrypted);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Disconnect(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_QueryMaxPayload(IntPtr lpTTInstance, int nUserID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetClientStatistics(IntPtr lpTTInstance,
ref BearWare.ClientStatistics lpStats);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetClientKeepAlive(IntPtr lpTTInstance,
ref BearWare.ClientKeepAlive lpClientKeepAlive);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetClientKeepAlive(IntPtr lpTTInstance,
ref BearWare.ClientKeepAlive lpClientKeepAlive);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoPing(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoLogin(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szNickname,
[MarshalAs(UnmanagedType.LPWStr)] string szUsername,
[MarshalAs(UnmanagedType.LPWStr)] string szPassword);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoLoginEx(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szNickname,
[MarshalAs(UnmanagedType.LPWStr)] string szUsername,
[MarshalAs(UnmanagedType.LPWStr)] string szPassword,
[MarshalAs(UnmanagedType.LPWStr)] string szClientName);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoLogout(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoJoinChannel(IntPtr lpTTInstance,
ref BearWare.Channel lpChannel);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoJoinChannelByID(IntPtr lpTTInstance,
int nChannelID,
[MarshalAs(UnmanagedType.LPWStr)] string szPassword);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoLeaveChannel(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoChangeNickname(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szNewNick);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoChangeStatus(IntPtr lpTTInstance,
int nStatusMode,
[MarshalAs(UnmanagedType.LPWStr)] string szStatusMessage);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoTextMessage(IntPtr lpTTInstance,
ref BearWare.TextMessage lpTextMessage);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoChannelOp(IntPtr lpTTInstance,
int nUserID,
int nChannelID,
bool bMakeOperator);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoChannelOpEx(IntPtr lpTTInstance,
int nUserID,
int nChannelID,
[MarshalAs(UnmanagedType.LPWStr)] string szOpPassword,
bool bMakeOperator);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoKickUser(IntPtr lpTTInstance,
int nUserID,
int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoSendFile(IntPtr lpTTInstance,
int nChannelID,
[MarshalAs(UnmanagedType.LPWStr)] string szLocalFilePath);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoRecvFile(IntPtr lpTTInstance,
int nChannelID,
int nFileID,
[MarshalAs(UnmanagedType.LPWStr)] string szLocalFilePath);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoDeleteFile(IntPtr lpTTInstance,
int nChannelID,
int nFileID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoSubscribe(IntPtr lpTTInstance,
int nUserID,
BearWare.Subscription uSubscriptions);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoUnsubscribe(IntPtr lpTTInstance,
int nUserID,
BearWare.Subscription uSubscriptions);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoMakeChannel(IntPtr lpTTInstance,
ref BearWare.Channel lpChannel);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoUpdateChannel(IntPtr lpTTInstance,
ref BearWare.Channel lpChannel);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoRemoveChannel(IntPtr lpTTInstance,
int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoMoveUser(IntPtr lpTTInstance,
int nUserID,
int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoUpdateServer(IntPtr lpTTInstance,
ref BearWare.ServerProperties lpServerInfo);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoListUserAccounts(IntPtr lpTTInstance,
int nIndex,
int nCount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoNewUserAccount(IntPtr lpTTInstance,
ref BearWare.UserAccount lpUserAccount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoDeleteUserAccount(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szUsername);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoBanUser(IntPtr lpTTInstance,
int nUserID, int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoBanUserEx(IntPtr lpTTInstance,
int nUserID, BearWare.BanType uBanTypes);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoBan(IntPtr lpTTInstance, ref BearWare.BannedUser lpBannedUser);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoBanIPAddress(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szIPAddress,
int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoUnBanUser(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szIPAddress,
int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoUnBanUserEx(IntPtr lpTTInstance,
ref BearWare.BannedUser lpBannedUser);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoListBans(IntPtr lpTTInstance, int nChannelID, int nIndex, int nCount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoSaveConfig(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoQueryServerStats(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DoQuit(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetServerProperties(IntPtr lpTTInstance,
ref BearWare.ServerProperties lpProperties);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "TT_GetServerUsers")] /* Windows CE NULL pointer workaround */
public static extern bool TT_GetServerUsers_NULL(IntPtr lpTTInstance,
IntPtr lpUsers,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetServerUsers(IntPtr lpTTInstance,
[In, Out] BearWare.User[] lpUsers,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetRootChannelID(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetMyChannelID(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetChannel(IntPtr lpTTInstance,
int nChannelID,
ref BearWare.Channel lpChannel);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetChannelPath(IntPtr lpTTInstance,
int nChannelID,
IntPtr szChannelPath);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetChannelIDFromPath(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szChannelPath);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "TT_GetChannelUsers")] /* Windows CE NULL pointer workaround */
public static extern bool TT_GetChannelUsers_NULL(IntPtr lpTTInstance,
int nChannelID,
IntPtr lpUsers,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetChannelUsers(IntPtr lpTTInstance,
int nChannelID,
[In, Out] BearWare.User[] lpUsers,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "TT_GetChannelFiles")] /* Windows CE NULL pointer workaround */
public static extern bool TT_GetChannelFiles_NULL(IntPtr lpTTInstance,
int nChannelID,
IntPtr lpFileInfos,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetChannelFiles(IntPtr lpTTInstance,
int nChannelID,
[In, Out] BearWare.RemoteFile[] lpRemoteFiles,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetChannelFile(IntPtr lpTTInstance,
int nChannelID,
int nFileID,
ref BearWare.RemoteFile lpRemoteFile);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_IsChannelOperator(IntPtr lpTTInstance,
int nUserID,
int nChannelID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "TT_GetServerChannels")] /* Windows CE NULL pointer workaround */
public static extern bool TT_GetServerChannels_NULL(IntPtr lpTTInstance,
IntPtr lpUserIDs,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetServerChannels(IntPtr lpTTInstance,
[In, Out] BearWare.Channel[] lpChannels,
ref int lpnHowMany);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetMyUserID(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetMyUserAccount(IntPtr lpTTInstance,
ref BearWare.UserAccount lpUserAccount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern BearWare.UserType TT_GetMyUserType(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern BearWare.UserRight TT_GetMyUserRights(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_GetMyUserData(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetUser(IntPtr lpTTInstance,
int nUserID, ref BearWare.User lpUser);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetUserStatistics(IntPtr lpTTInstance,
int nUserID,
ref BearWare.UserStatistics lpStats);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetUserByUsername(IntPtr lpTTInstance,
[MarshalAs(UnmanagedType.LPWStr)] string szUsername,
ref BearWare.User lpUser);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetTextMessage(IntPtr lpTTInstance,
int nMsgID,
bool bRemoveMsg,
ref BearWare.TextMessage lpTextMessage);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserVolume(IntPtr lpTTInstance,
int nUserID, BearWare.StreamType nStreamType, int nVolume);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserMute(IntPtr lpTTInstance,
int nUserID, BearWare.StreamType nStreamType, bool bMute);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserStoppedPlaybackDelay(IntPtr lpTTInstance,
int nUserID,
BearWare.StreamType nStreamType,
int nDelayMSec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserJitterControl(IntPtr lpTTInstance,
int nUserID,
BearWare.StreamType nStreamType,
ref BearWare.JitterConfig lpJitterConfig);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetUserJitterControl(IntPtr lpTTInstance,
int nUserID,
BearWare.StreamType nStreamType,
ref BearWare.JitterConfig lpJitterConfig);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserPosition(IntPtr lpTTInstance,
int nUserID,
BearWare.StreamType nStreamType,
float x,
float y,
float z);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserStereo(IntPtr lpTTInstance,
int nUserID,
BearWare.StreamType nStreamType,
bool bLeftSpeaker,
bool bRightSpeaker);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserMediaStorageDir(IntPtr lpTTInstance,
int nUserID,
[MarshalAs(UnmanagedType.LPWStr)] string szFolderPath,
[MarshalAs(UnmanagedType.LPWStr)] string szFileNameVars,
BearWare.AudioFileFormat uAFF);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserMediaStorageDirEx(IntPtr lpTTInstance,
int nUserID,
[MarshalAs(UnmanagedType.LPWStr)] string szFolderPath,
[MarshalAs(UnmanagedType.LPWStr)] string szFileNameVars,
BearWare.AudioFileFormat uAFF,
int nStopRecordingExtraDelayMSec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_SetUserAudioStreamBufferSize(IntPtr lpTTInstance,
int nUserID,
BearWare.StreamType uStreamType,
int nMSec);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern IntPtr TT_AcquireUserAudioBlock(IntPtr lpTTInstance,
BearWare.StreamType nStreamType,
int nUserID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_ReleaseUserAudioBlock(IntPtr lpTTInstance, IntPtr lpAudioBlock);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_GetFileTransferInfo(IntPtr lpTTInstance,
int nTransferID,
ref BearWare.FileTransfer lpFileTransfer);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_CancelFileTransfer(IntPtr lpTTInstance,
int nTransferID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern void TT_GetErrorMessage(int nError,
IntPtr szErrorMsg);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DesktopInput_KeyTranslate(BearWare.TTKeyTranslate nTranslate,
[In] BearWare.DesktopInput[] lpDesktopInputs,
[In, Out] BearWare.DesktopInput[] lpTranslatedDesktopInputs,
int nDesktopInputCount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DesktopInput_Execute([In, Out] BearWare.DesktopInput[] lpDesktopInputs,
int nDesktopInputCount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_HotKey_Register(IntPtr lpTTInstance,
int nHotKeyID,
[In, Out] int[] lpnVKCodes,
int nVKCodeCount);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_HotKey_Unregister(IntPtr lpTTInstance,
int nHotKeyID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_HotKey_IsActive(IntPtr lpTTInstance,
int nHotKeyID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_HotKey_InstallTestHook(IntPtr lpTTInstance,
/* HWND */ IntPtr hWnd, uint uMsg);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_HotKey_RemoveTestHook(IntPtr lpTTInstance);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_HotKey_GetKeyString(IntPtr lpTTInstance,
int nVKCode,
IntPtr szKeyName);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_DBG_SIZEOF(BearWare.TTType nType);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_DBG_SetSoundInputTone(IntPtr lpTTInstance,
BearWare.StreamType uStreamTypes,
int nFrequency);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_DBG_WriteAudioFileTone(ref BearWare.MediaFileInfo lpMediaFileInfo,
int nFrequency);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern System.IntPtr TT_DBG_GETDATAPTR(ref BearWare.TTMessage pMsg);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetMixerCount();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_GetMixerName(int nMixerIndex,
IntPtr szMixerName);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_GetWaveInName(int nWaveDeviceID,
IntPtr szMixerName);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_GetWaveOutName(int nWaveDeviceID,
IntPtr szMixerName);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveOutMute(int nWaveDeviceID,
BearWare.MixerControl nControl,
bool bMute);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveOutMute(int nWaveDeviceID,
BearWare.MixerControl nControl);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveOutVolume(int nWaveDeviceID,
BearWare.MixerControl nControl,
int nVolume);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveOutVolume(int nWaveDeviceID,
BearWare.MixerControl nControl);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveInSelected(int nWaveDeviceID,
BearWare.MixerControl nControl);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveInSelected(int nWaveDeviceID,
BearWare.MixerControl nControl);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveInVolume(int nWaveDeviceID,
BearWare.MixerControl nControl,
int nVolume);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveInVolume(int nWaveDeviceID,
BearWare.MixerControl nControl);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveInBoost(int nWaveDeviceID,
bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveInBoost(int nWaveDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveInMute(int nWaveDeviceID,
bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveInMute(int nWaveDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern int TT_Mixer_GetWaveInControlCount(int nWaveDeviceID);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_GetWaveInControlName(int nWaveDeviceID,
int nControlIndex,
IntPtr szDeviceName);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_SetWaveInControlSelected(int nWaveDeviceID,
int nControlIndex);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Mixer_GetWaveInControlSelected(int nWaveDeviceID,
int nControlIndex);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Firewall_IsEnabled();
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Firewall_Enable(bool bEnable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Firewall_AppExceptionExists([MarshalAs(UnmanagedType.LPWStr)] string szExecutable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Firewall_AddAppException([MarshalAs(UnmanagedType.LPWStr)] string szName,
[MarshalAs(UnmanagedType.LPWStr)] string szExecutable);
[DllImport(dllname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern bool TT_Firewall_RemoveAppException([MarshalAs(UnmanagedType.LPWStr)] string szExecutable);
}
}