Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LINEEVENT callback function in Windows-8/8.1 (64-bit OS)

27 views
Skip to first unread message

Ravi Kansangara

unread,
Aug 27, 2015, 6:23:43 AM8/27/15
to
Hi

I have developed TSP for PBX.

It is supported for 32-bit OS & 64-bit OS.

Recently i am facing one issue with 64-bit TSP in Windows-8.1 (x64) OS.

------------------------------------------------
Issue Details:
------------------------------------------------

1. I have exposed all TAPI lines dynamically.
By means of passing LINE_CREATE message in LINEEVENT callback.

2. Now It is expected that TAPISRV should call the function
TSPI_providerCreateLineDevice upon receiving the LINE_CREATE message.

3. But in Win8-64bit i have observed that upon sending LINE_CREATE
message to TAPISRV, it is not calling the TSPI_providerCreateLineDevice
function.


------------------------------------------------
Work Done:
------------------------------------------------

1. I have read the link related to this issue.

https://groups.google.com/forum/#!topic/microsoft.public.win32.programmer.tapi/dME3m6OQOh0

(Post is regarding to LINE_NEWCALL message in LINEEVENT callback)

2. AS per answer of andreas marschall in above post & MSDN,
i have to change type cast of dwParam1, dwParam2 & dwParam3 of LINEEVENT
callback from DWORD to DWORD_PTR to work proper in above said OS.

i.e.
LINE_CREATE
htLine = (HTAPILINE) 0;
htCall = (HTAPICALL) 0;
dwMsg = (DWORD) LINE_CREATE;
dwParam1 = (DWORD_PTR) hProvider;
dwParam2 = (DWORD_PTR) TempDeviceId (This is provided by my TSP);
dwParam3 = (DWORD_PTR) 0;

3. So i have changed the type casting where ever LINEEVENT callback is used.
Then i have again build the TSP for x64 platform & observed the
flow of messages.

4. Still some problem is there...


------------------------------------------------
Observations after Work Done:
------------------------------------------------

1. Now the half problem gets resolved.....
That is TAPISRV is calling the TSPI_providerCreateLineDevice function
upon receiving the LINE_CREATE message.

2. But.. Other problem is raised that is regarding to dwDeviceID assigned by
the TAPISRV.

3. It is expected that on every call of TSPI_providerCreateLineDevice,
TAPISRV should pass the..
dwTempID (that is temporary id given by TSP in LINE_CREATE message)
dwDeviceID (that is permanent device id assigned by TAPISRV)

LONG TSPIAPI TSPI_providerCreateLineDevice(
DWORD_PTR dwTempID,
DWORD dwDeviceID
);

4. It is observed that in every call of TSPI_providerCreateLineDevice,
TAPISRV is assigning device id value as 0 (zero).

I have put the validation for in dwDeviceID in
TSPI_providerCreateLineDevice that is if it is passed as 0 TSP will
return the error code LINEERR_OPERATIONFAILED.

(I think i should return LINEERR_BADDEVICEID...)

NOTE: Temporary device id provided by TAPISRV is correct and
is same as passed by TSP.

5. So i can't create the new device correctly.


------------------------------------------------
Queries:
------------------------------------------------

1. Is 0 (zero) value for permanent device ID valid ?

2. Is any type of validation for device ID should be there in
TSPI_providerCreateLineDevice ?

3. What may be other root cause for this issue?


Thanks,
Ravi Kansangara
0 new messages