Blia u menia opiati problemi help!!!!!!
Vot smotrite ya kampilu moi src:#include #include #include #include HLINEAPP g_hhLineApp;HLINE g_tline;HANDLE g_tevent;DWORD tStatus;DWORD d_MediaMode=LINEMEDIAMODE_INTERACTIVEVOICE;LONG res;LONG lOpen;DWORD lpdwNumDevs,dw_devId;LINEINITIALIZEEXPARAMS lp;LINEMESSAGE lpMessage;DWORD tapiVer=TAPI_CURRENT_VERSION;DWORD SelectLine(HLINEAPP hLineApp,DWORD dwNmDevs,DWORD dwMediaMode);void main(){memset(&lp,0,sizeof(LINEINITIALIZEEXPARAMS)); lp.dwTotalSize=sizeof(LINEINITIALIZEEXPARAMS);lp.dwNeededSize=sizeof(LINEINITIALIZEEXPARAMS);lp.dwUsedSize=sizeof(LINEINITIALIZEEXPARAMS);lp.dwOptions=LINEINITIALIZEEXOPTION_USEEVENT;res=lineInitializeEx(&g_hhLineApp,NULL,NULL,"TapiTest",&lpdwNumDevs,&tapiVer,&lp);if(res!=0){printf("Seans TAPI ne bil initzializirovan\n");switch(res){case LINEERR_INVALAPPNAME :printf("ERROR:lINEERR_INVALAPPNAME\n");exit(-1);break;case LINEERR_OPERATIONFAILED:printf("ERROR:LINEERR_OPERATIONFAILED\n");exit(-1);break;case LINEERR_INIFILECORRUPT:printf("ERROR:LINEERR_INIFILECORRUPT\n");exit(-1);break;case LINEERR_INVALPOINTER:printf("INVALPOINTER\n");exit(-1);break;case LINEERR_REINIT:printf("ERROR:LINEERR_REINIT:\n");exit(-1);break;case LINEERR_NOMEM:printf("ERROR:NOMEM\n");exit(-1);break;case LINEERR_INVALPARAM:printf("ERROR:LINEERR_INVALPARAM:\n");exit(-1);break;default:printf("Ne apoznanaia oshibka init\n");exit(-1);}}printf("Seans TAPI bil uspeshno initzializirovan\n");g_tevent=lp.Handles.hEvent;dw_devId=SelectLine(g_hhLineApp,lpdwNumDevs,d_MediaMode);if(dw_devId==0xffffffff){printf("Ne vozmojno otkrit` liniu ne dastatoc`no pameti\n");exit(-1);} lOpen=lineOpen(g_hhLineApp,dw_devId,&g_tline,tapiVer,0x00000000,1,LINECALLPRIVILEGE_OWNER,d_MediaMode,NULL);if(lOpen!=0){printf("Lineia ne bila otkrita\n");switch(lOpen){case LINEERR_ALLOCATED :printf("LINEERR_ALLOCATED \n");exit(-1);break;case LINEERR_NODEVICE :printf("LINEERR_NODEVICE \n");exit(-1);break;case LINEERR_BADDEVICEID :printf("LINEERR_BADDEVICEID \n");exit(-1);break;case LINEERR_NODRIVER :printf("LINEERR_NODRIVER \n");exit(-1);break;case LINEERR_INCOMPATIBLEAPIVERSION :printf("LINEERR_INCOMPATIBLEAPIVERSION\n");exit(-1);break;case LINEERR_NOMEM :printf("LINEERR_NOMEM\n");exit(-1);break;case LINEERR_INCOMPATIBLEEXTVERSION :printf("LINEERR_INCOMPATIBLEEXTVERSION\n");exit(-1);break;case LINEERR_OPERATIONFAILED :printf("LINEERR_OPERATIONFAILED\n");exit(-1);break;case LINEERR_INVALAPPHANDLE :printf("LINEERR_INVALAPPHANDLE\n");exit(-1);break;case LINEERR_OPERATIONUNAVAIL :printf("LINEERR_OPERATIONUNAVAIL\n");exit(-1);break;case LINEERR_INVALMEDIAMODE :printf("LINEERR_INVALMEDIAMODE\n");exit(-1);break;case LINEERR_REINIT :printf("LINEERR_REINIT\n");exit(-1);break;case LINEERR_INVALPOINTER :printf("LINEERR_INVALPOINTER\n");exit(-1);break;case LINEERR_RESOURCEUNAVAIL :printf("LINEERR_RESOURCEUNAVAIL\n");exit(-1);break;case LINEERR_INVALPRIVSELECT :printf("LINEERR_INVALPRIVSELECT\n");exit(-1);break;case LINEERR_STRUCTURETOOSMALL :printf("LINEERR_STRUCTURETOOSMALL\n");exit(-1);break;case LINEERR_LINEMAPPERFAILED:printf("LINEERR_LINEMAPPERFAILED\n");exit(-1);break;case LINEERR_UNINITIALIZED :printf("LINEERR_UNINITIALIZED \n");exit(-1);break;default:printf("Ne apoznanaia oshibka\n");exit(-1);}}printf("Lineia bila otkrita\n");tStatus=WaitForSingleObject(g_tevent,INFINITE);if(tStatus==WAIT_OBJECT_0)if(lineGetMessage(g_hhLineApp,&lpMessage,0)!=0){printf("Soobhsenie ne bilo poluceno\n");exit(-1);}printf("Soobshenie bilo poluceno\n");switch(lpMessage.dwMessageID){case LINE_CALLSTATE:switch(lpMessage.dwParam1){case LINECALLSTATE_OFFERING:printf("V prilojenie postupil zvonok\n");break;case LINECALLSTATE_IDLE:printf("Zvanok otsutstvuet\n");break;}break;}}DWORD SelectLine(HLINEAPP hLineApp,DWORD dwNmDevs,DWORD dwMediaMode){LINEDEVCAPS *lpDevCaps;LINEEXTENSIONID ExtId;DWORD i,dwResult=0xffffffff;DWORD lpdwAPIVersion;LONG iRes;BOOL dn;printf("ID of device[%d]:\n",lpdwNumDevs);for(i=0;idwTotalSize=sizeof(LINEDEVCAPS)+1000;dn=FALSE;do{iRes=lineGetDevCaps(g_hhLineApp,i,lpdwAPIVersion,0,lpDevCaps);if(iRes!=0){printf("Ne vozmojno polucit` porametri ustroistva\n");free(lpDevCaps);break;}printf("Parametri ustroistva [%d] bili uspeshno poluceni\n",i);if(lpDevCaps->dwNeededSize>lpDevCaps->dwTotalSize)lpDevCaps=(LINEDEVCAPS*)realloc(lpDevCaps,lpDevCaps->dwNeededSize);elsedn=TRUE;}while(!dn);if(lpDevCaps->dwMediaModes & dwMediaMode){dwResult=i;printf("Bilo vibrono ustroistva[%d]\n",i); }elseprintf("Lineia ne dostupna[%d]\n",i);free(lpDevCaps);} return dwResult;}blin a pri vipolnenie mne vidaiot LINEERR_INCOMPATIBLEAPIVERSION hotia functzia lineNegotiateAPIVersion ne vidaiot ne kakih oshibok.V ciom problema pomogite