Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: "Matthias Moetje [MVP]" <moetje@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jul 2007 18:14:01 +0200
Hi,
Wierd indeed. But seems to work...
Tested with several apps. Not sure I understand what you mean by "Phone
dialer with audio", but tested several apps.
Start >> Run >> Dialer.exe
Edit >> Options: Select your line for phone calls; second tab: Select your
audio device (e.g. sound card mic and speakers)
Create phone call.
See if you hear audio.
Also - using my own test app, tried puting various values in dwTotalSize,
and it seems to work ok - the TAPI service seems to take care of the
dwNeededSize checks...
But - since I suspect all this may be a result of some windows xp update -
it may not work properly on old XP computers who did not update.
Does it work on W2k?
Best regards,
Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"Matthias Moetje [MVP]" wrote:
Hi Shimon,
that seems really weird...
I don't think that this is the correct solution. Are you sure that this
doesn't
break applications? What if an application is not coded to take care of
the
dwNeededSize?
What I think is correct is NOT to return LINEERR_STRUCTURETOOSMALL,
Unimodem doesn't do this either.
Does this work with the Wave MSP (to test this simply start Windows Phone
Dialer
and see if you can make calls with audio)?
Best regards,
Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"Way2caller" <Way2caller@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:46D037D6-04D6-46DD-BEDF-E168D8129848@xxxxxxxxxxxxxxxx
Hi Matthias,
This code seems to work.
I am not totally happy with this, cause I dont like
going with "hunch" solutions - not knowing why
a solution works...
============================================
if (lpDeviceID->dwTotalSize <
sizeof(VARSTRING)+sizeof(DWORD)+0x00000100+100)
{
// Resize buffer:
lpDeviceID->dwNeededSize =
sizeof(VARSTRING)+sizeof(DWORD)+0x00000100+100;
return 0;
}
lpDeviceID->dwNeededSize = sizeof(VARSTRING) +
sizeof(DWORD)+0x00000100+100;
if (lpDeviceID->dwTotalSize >= sizeof(VARSTRING) + sizeof(DWORD))
{
lpDeviceID->dwStringFormat = STRINGFORMAT_BINARY;
lpDeviceID->dwNeededSize = sizeof(VARSTRING)+sizeof(DWORD);
lpDeviceID->dwUsedSize = sizeof(VARSTRING)+sizeof(DWORD);
lpDeviceID->dwStringOffset = sizeof(VARSTRING);
lpDeviceID->dwStringSize = sizeof(DWORD);
*(DWORD *)((BYTE *)lpDeviceID + sizeof(VARSTRING)) = dwID;
return 0;
}
return 0;
============================================
"Matthias Moetje [MVP]" wrote:
Shimon,
maybe this is the same problem I was just facing a few weeks ago,
when I wanted to perform some tests with your device/TSP.
I couldn't get it working but didn't have enough time to look into
it more thoroughly...
How do you enumerate the wave devices?
Here's what Unimodem does:
It uses LoadLibrary to load winmm.dll dynamically.
Then it calls GetProcAddress to get pointer to the functions
waveInGetDevCapsW
waveInGetNumDevs
(or the corresponding out functions)
If first calls n=waveInGetNumDevs() and then loops from 0 to n-1
calling waveInGetDevCaps and compares the wave device names
to find the correct one.
If you say that this is different from what you receive in the
application's
context, in which way is this different. Can you show both lists for
comparison?
One problem I know which often interferes with TSPs' audio devices
is the RDP audio mapper which replaces all wave devices once a
remote desktop session is started (with enabled audio mapping).
Though,
we have experienced this behaviour with Windows Server 2003, usually.
Best regards,
Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"Way2caller" <Way2caller@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:57C2D826-B364-45E6-9784-56D7692CA16D@xxxxxxxxxxxxxxxx
Hi,
Thanks for your support.
Yes - we do have a TSP that supports wave devices.
It even works great with Vista.
It USED to work great on XP, too, but now all of a sadden it stopped
working.
I can only guess some XP update changed something in the way TAPI
works...
Anyway - I just found something interesting - the enumeration of
wave
devices yields a different order when it is done in the TSP space,
or
in
the
APP space.
I guess this is part of what's going wrong.
"Matthias Moetje [MVP]" wrote:
Shimon,
1. I guess you can not email me the TSPI_lineGetID source code ?
No, according to the license agreement this is not allowed. I am
not
even allowed to make personal copies (just browsing online).
2. I hope I am not pushing it too far, but could you just check
what
you
get
in return to calling lineGetID with "wave/Out" (with the MSP) ?
Our TSP does not offer any wave devices and thus device classes
with
wave/... are not supported.
3. Tried to figure out that, but with no success.
My TSP does return 0, and it does not touch the dwTotalSize
field.
I don't have any more ideas, as I can't see your source code.
Looking at your display name I wonder: Don't you already have a
working
TSP that supports wave devices...?
Best regards,
Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
Thanks again for sticking with me on this.
"Matthias Moetje [MVP]" wrote:
Shimon,
Question is where the problem lies...
Do you have the UNIMODEM source code ?
Yes, I have access to the source code under the MVPSLA.
Do you know if for UNIMODEM the buffer size is enlarged, too ?
I don't know. Unfortunately I have no time to debug this at
the moment. Both of our TSPs come with an MSP and don't
offer any wave devices, so I don't have practical experience
with lineGetID on the TSPI side.
It seems TAPI always increases the buffer size - no matter
what
size
I originally send via TB20 - TAPI always adds 0x100 to it.
(and when the buffer gets back to the app - it is reduced
again
by
0x100...)
Maybe this is just a security measure of tapisrv to avoid memory
being overwritten or to be compatible with previous TSPI
versions...
I wouldn't concentrate on the increased size but rather on the
reason
why TAPI returns an error.
Do you return 0 (zero) for this function?
Does your TSP write to the dwTotalSite member?
Best regards,
Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"Matthias Moetje [MVP]" wrote:
Hi,
the method I posted is exactly the same like Unimodem is
doing
it.
So if you are doing exactly what I posted, the problem must
be
somewhere else...
PS: I don't know why TAPI increases the size of the
structure.
What
happens if you pass a much larger structure through TB..?
Best regards,
Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"Way2caller" <Way2caller@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:1B45D8CF-8BDC-4AD0-B9D4-BDE60D880433@xxxxxxxxxxxxxxxx
Hi,
Did it.
Same results.
When entering TSPI_lineGetID, I have:
lpDeviceID->dwTotalSize=0x124 (which is +0x100 from the
value
in
TB20)
lpDeviceID->dwNeededSize=0x18
lpDeviceID->dwUsedSize=0x18
Just before the app returns:
lpDeviceID->dwTotalSize=0x124 (which is +0x100 from the
value
in
TB20)
lpDeviceID->dwNeededSize=0x1c
lpDeviceID->dwUsedSize=0x1c
lpDeviceID->dwStringFormat=4
lpDeviceID->dwStringSize=4
.
- Follow-Ups:
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- References:
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Matthias Moetje [MVP]
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- From: Way2caller
- Re: TSPI_LineGetID - what should it return for "wave/out" ?
- Prev by Date: Re: TAPI Browser and TSPs
- Next by Date: Re: TSP in Vista (Access is Denied)
- Previous by thread: Re: TSPI_LineGetID - what should it return for "wave/out" ?
- Next by thread: Re: TSPI_LineGetID - what should it return for "wave/out" ?
- Index(es):
Relevant Pages
|