Link to home
Start Free TrialLog in
Avatar of chanhin
chanhin

asked on

How does lineGetID return File Handle?

Hi,

Sorry for troubling you all. I know my only help in TAPI. I had tried to understand the Tapicomm source codes as well as my best to find where it extract the filehandle from lineGetID but I failed to find the right one. It had troubling me for weeks.

I know it sound stupid. May I know how does lineGetID return file handle? Where? in the VARSTRING? Please explain a bit on how the file handle return from lineGetID. Which one is needed by the writefile and readfile function?

Million thanks for you kind reply.

LIM CHAN HIN
Avatar of kinkajou
kinkajou

The only handles that lineGetID() returns are hLine - a handle to an open line device and hCall - a handle to a call, for LONG lineGetID ( HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass );

The VARSTRING structure is used for returning variably sized strings. It is used both by the line device class and the phone device class.

typedef struct varstring_tag {
    DWORD  dwTotalSize;
    DWORD  dwNeededSize;
    DWORD  dwUsedSize;
    DWORD  dwStringFormat;
    DWORD  dwStringSize;
    DWORD  dwStringOffset;
} VARSTRING, FAR *LPVARSTRING;
 
A pointer to a memory location of type VARSTRING, where the device identifier is returned. Upon successful completion of the request, this location is filled with the device identifier. The format of the returned information depends on the method used by the device class API for naming devices. Prior to calling lineGetID, the application should set the dwTotalSize member of this structure to indicate the amount of memory available to TAPI for returning information.
ASKER CERTIFIED SOLUTION
Avatar of kinkajou
kinkajou

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chanhin

ASKER

I thank you him for answering my question. However, he didn't answer to my question IMHO. At least the answer isn't what I am looking for.

Sorry for being rude. He is good in explaning but just not to the question. Millions thank for your answer anyway. However, I had done it with myself (tried and error). I am a happy man now :)
The procedure here is to comment and reject when the answer isn't what you want. I did not need your "D" grade or your acceptance of my answer. Thanks for nothing.
Chanhin, can you post the code which solved your problem? I'm trying to play wav files over the phone and am having problems as well.

Thanks,
Grailman