Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Kdtele ActiveX
Message
 
À
19/11/2005 15:28:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Divers
Thread ID:
01070113
Message ID:
01352843
Vues:
32
After 3 years suddenly i think that maybe i could solve the problem.Then i read the VB code deeply and finally i could solve the problem and here it is :
Local lvLineCaps As KDTele.TxLineCaps, lvRet As Long
#Define lcWavePlayRec	1
#Define lcCallerID	2
#Define lcCalledID	4
#Define lcDigitPulseDetect	8
#Define lcDigitToneDetect	16
#Define lcExtDevAux	32
#Define lcExtDevAuxMicOffSpeakerOff	64
#Define lcExtDevAuxMicOnSpeakerOff	128
#Define lcExtDevAuxMicOffSpeakerOn	256
#Define lcExtDevAuxMicOnSpeakerOn	512
#Define lcExtDevAuxMicGain	1024
#Define lcExtDevAuxSpeakerVolume	2048
#Define lcExtDevHandset	4096
#Define lcExtDevHandsetMicOffSpeakerOff	8192
#Define lcExtDevHandsetMicOnSpeakerOff	16384
#Define lcExtDevHandsetMicOffSpeakerOn	32768
#Define lcExtDevHandsetMicOnSpeakerOn	65536
#Define lcExtDevHandsetMicGain	131072
#Define lcExtDevHandsetSpeakerVolume	262144
#Define lcDataDevice	524288

lvLineCaps=0
Thisform.edit1.Value = ""
vbCrLf=Chr(13)
lvRet = Thisform.kdphone.GetLineCaps(Thisform.combo1.ListIndex-1, @lvLineCaps)
If lvRet <> 0
	Thisform.edit1.Value = "Error: " + Thisform.kdphone.GetErrorMsg(lvRet)
	Return
Endif

If Bitand(lcCallerID,lvLineCaps)!=0
	Thisform.edit1.Value = Thisform.edit1.Value + "Caller ID - OK" + vbCrLf
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Caller ID - UNAVAILABLE" + vbCrLf
Endif
If Bitand(lcDigitPulseDetect , lvLineCaps)!=0 Then
	Thisform.edit1.Value = Thisform.edit1.Value + "Digit pulse detection - OK" + vbCrLf
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Digit pulse detection - UNAVAILABLE" + vbCrLf
Endif
If Bitand(lcDigitToneDetect , lvLineCaps)!=0 Then
	Thisform.edit1.Value = Thisform.edit1.Value + "Digit tone detection - OK" + vbCrLf
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Digit tone detection - UNAVAILABLE" + vbCrLf
Endif
If Bitand(lcWavePlayRec , lvLineCaps)!=0 Then
	Thisform.edit1.Value = Thisform.edit1.Value + "Play and record wave - OK" + vbCrLf
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Play and record wave - UNAVAILABLE" + vbCrLf
Endif
If Bitand(lcDataDevice , lvLineCaps)!=0 Then
	Thisform.edit1.Value = Thisform.edit1.Value + "Serial port device  - OK" + vbCrLf
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Serial port device - UNAVAILABLE" + vbCrLf
Endif
If Bitand(lcExtDevAux , lvLineCaps)!=0 Then
	Thisform.edit1.Value = Thisform.edit1.Value + "Auxiliary microphone and speaker capabilities:" + vbCrLf
	If Bitand(lcExtDevAuxMicOnSpeakerOff , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the mic only - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the mic only - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevAuxMicOffSpeakerOn , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the speaker only - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the speaker only - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevAuxMicOnSpeakerOn , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the microphone and the speaker simultaneously - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the microphone and the speaker simultaneously - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevAuxMicGain , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Mic gain adjusting - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Mic gain adjusting - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevAuxSpeakerVolume , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Speaker volume adjusting - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Speaker volume adjusting - UNAVAILABLE" + vbCrLf
	Endif
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Auxiliary microphone and speaker - UNAVAILABLE" + vbCrLf
Endif
If Bitand(lcExtDevHandset , lvLineCaps)!=0 Then
	Thisform.edit1.Value = Thisform.edit1.Value + "Local phone handset capabilities:" + vbCrLf
	If Bitand(lcExtDevHandsetMicOnSpeakerOff , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the mic only - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the mic only - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevHandsetMicOffSpeakerOn , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the speaker only - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the speaker only - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevHandsetMicOnSpeakerOn , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the microphone and the speaker simultaneously - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Turning on the microphone and the speaker simultaneously - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevHandsetMicGain , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Mic gain adjusting - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Mic gain adjusting - UNAVAILABLE" + vbCrLf
	Endif
	If Bitand(lcExtDevHandsetSpeakerVolume , lvLineCaps)!=0 Then
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Speaker volume adjusting - OK" + vbCrLf
	Else
		Thisform.edit1.Value = Thisform.edit1.Value + "   -Speaker volume adjusting - UNAVAILABLE" + vbCrLf
	Endif
Else
	Thisform.edit1.Value = Thisform.edit1.Value + "Local phone handset - UNAVAILABLE" + vbCrLf
Endif
Ali Mohammad Hossein Zadeh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform