Can't get lineTranslateAddress() to populate UDT - PLEASE HELP
- From: "Rick" <NOSPAM@xxxxxxxxxxxxxxx>
- Date: Mon, 12 Feb 2007 22:36:43 -0500
I've cut this down to the utmost basic by entering the parameter values
directly into the lineTranslateAddress() function. It returns
TAPI_SUCCESS - zero. But only populates 4 of the values in the UDT.
This is the last thing I need to get working to finish my project. I've
studied everything I can get my hands on and don't understand why this isn't
working. I can make it work with the same values with TAPI Browser
Private Declare Function lineTranslateAddress Lib "tapi32.dll" _
(ByVal hLineApp As Long, _
ByVal dwDeviceID As Long, _
ByVal dwAPIVersion As Long, _
ByVal lpszAddressin As String, _
ByVal dwCard As Long, _
ByVal dwTranslateOptions As Long, _
ByRef lpTranslateOutput As TRANSLATEOUTPUT) As Long
Private Type TRANSLATEOUTPUT
dwTotalSize As Long
dwNeededSize As Long
dwUsedSize As Long
dwDialableStringSize As Long
dwDialableStringOffset As Long
dwDisplayableStringSize As Long
dwDisplayableStringOffset As Long
dwCurrentCountry As Long
dwDestCountry As Long
dwTranslateResults As Long
End Type
Dim RetVal As Long, tlo As TRANSLATEOUTPUT
tlo.dwTotalSize = Len(tlo)
RetVal = lineTranslateAddress(&H0, &H0, &H20002, "+1 (813) 5551212", &H0,
&H0, tlo)
The above line returns TAPI_SUCCESS but only populates 4 additional
values in the UDT.
dwCurrentCountry = 1
dwDestCountry = 1
dwDialableStringOffset = 0
dwDialableStringSize = 0
dwDisplayableStringOffset = 0
dwDisplayableStringSize = 0
dwNeededSize = 79
dwTotalSize = 40
dwTranslateResults = 0
dwUsedSize = 40
I've spent countless hours on this. It just won't work. Putting the same
values into TAPI Browser 2.0 (with the exception of the UDT pointer) works.
Heck they're all zeros except for the number string and the UDT pointer.
The pointer value of my UDT is: VarPtr(tlo)= 1297588. But it does not
return an Invalid Pointer Error and 4 more values in the UDT DO populate so
this pointer has to be correct, right?. There's nothing else I know of to
change.
Is there any way to help me fix this problem? I'd REALLY appreciate any
help anyone can offer.
Thanks very much.
Rick
.
- Follow-Ups:
- Re: Can't get lineTranslateAddress() to populate UDT - PLEASE HELP
- From: Matthias Moetje [MVP]
- Re: Can't get lineTranslateAddress() to populate UDT - !! IT WORKS !!
- From: Rick
- Re: Can't get lineTranslateAddress() to populate UDT - PLEASE HELP
- From: Andreas Marschall [MVP TAPI]
- Re: Can't get lineTranslateAddress() to populate UDT - PLEASE HELP
- From: Rick
- Re: Can't get lineTranslateAddress() to populate UDT - PLEASE HELP
- Prev by Date: attn: michel - highly colorful premium nntp server access - ohmi efbo - (1/1)
- Next by Date: Re: Trying to find the Values for LineTranslateResult Constants
- Previous by thread: attn: michel - highly colorful premium nntp server access - ohmi efbo - (1/1)
- Next by thread: Re: Can't get lineTranslateAddress() to populate UDT - PLEASE HELP
- Index(es):
Relevant Pages
|