I'm using Windows Mobile 2003 SE and QTEK9090 and I do a data connection and
I receive from TAPI connect event and in this event I try to obtain serial
handle so I run this code

DWORD dwsize;
LPVARSTRING pVarString;
dwsize=sizeof(VARSTRING)+1024;
pVarString= (LPVARSTRING) HeapAlloc(m_hheap,HEAP_ZERO_MEMORY,dwsize);
if (pVarString!=NULL)
{
pVarString->dwTotalSize =dwsize;
if
(0==lineGetID(hline,0,NULL,LINECALLSELECT_LINE,pVarString,_T("comm/datamodem")))
{
*phandle=*(HANDLE*)((LPBYTE)pVarString+pVarString->dwStringOffset);
return S_OK;
}
}
return E_FAIL;

but the handle return(*phandle) is 0

in windows XP this code works well and I can start to send and receive data
from and to serial port!!!