problem in setting linename in tsp

Iam creating a tsp in delphi. The problem is to set the device name. I have got the source to set the name. but it is in 'C'. can anyone help to convert this code into delphi or provide some suggestion to set the name

LONG TSPIAPI TSPI_lineGetDevCaps(DWORD dwDeviceID,DWORD dwTSPIVersion,

DWORD dwExtVersion, LPLINEDEVCAPS pldc) { LONG tr-0; const wchar_t szProviderInfo[]=L"WAVE Service provider"; const wchar_t szLineName[]=L"WaveLine";

pldc->dwNeededSize=sizeof(LINEDEVCAPS) + sizeof(szProviderInfo) +

sizeof(szLineName); if(pldc->dwNeededSizedwTotalSize) { pldc->dwUsedSize=pldc->dwNeededSize; pldc->dwProviderInfoOffset=sizeof(szProviderInfo);

wchar_t* pszProviderInfo=(wchar_t*)((BYTE*)pldc +

pldc->dwProviderInfoOffset); wcscpy(pszProviderInfo,szProviderInfo); pldc->dwLineNameSize=sizeof(szLineName); pldc->dwLineNameOffset=sizeof(LINEDEVCAPS)+sizeof(szProviderInfo); wchar_t* pszLineName=(wchar_t*)((BYTE*)pldc+pldc->dwLineNameOffset); wcscpy(pszLineName,szLineName);

} }

Thanks in Advance

Reply to
nick
Loading thread data ...

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.