Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC application(VS2008) does not execute in another computer Pin
tdc_india21-Sep-10 2:02
tdc_india21-Sep-10 2:02 
AnswerRe: MFC application(VS2008) does not execute in another computer Pin
Kushagra Tiwari21-Sep-10 2:19
Kushagra Tiwari21-Sep-10 2:19 
GeneralRe: MFC application(VS2008) does not execute in another computer Pin
tdc_india24-Sep-10 22:21
tdc_india24-Sep-10 22:21 
AnswerRe: MFC application(VS2008) does not execute in another computer Pin
Sauro Viti21-Sep-10 5:39
professionalSauro Viti21-Sep-10 5:39 
GeneralRe: MFC application(VS2008) does not execute in another computer Pin
tdc_india24-Sep-10 22:21
tdc_india24-Sep-10 22:21 
AnswerRe: MFC application(VS2008) does not execute in another computer Pin
yu-jian21-Sep-10 14:31
yu-jian21-Sep-10 14:31 
GeneralRe: MFC application(VS2008) does not execute in another computer Pin
tdc_india23-Sep-10 3:13
tdc_india23-Sep-10 3:13 
QuestionlineCallbackFunc not returning message..... [modified] Pin
AmbiguousName21-Sep-10 1:27
AmbiguousName21-Sep-10 1:27 
hello guys...everything seems to be fine here but when I call at my landline number it does't show me the number.

TapiInitialize()
void WINAPI TapiInitialize() {

	LPLINEDEVCAPS lineDevCaps = NULL;
	lineDevCaps = (LPLINEDEVCAPS)LocalAlloc(LPTR, 4096);
	
	//create the event first..
	EventReply = CreateEvent(NULL,FALSE,FALSE,NULL);

	//clear the structure before the usage
	memset(&LineInitializeExParams,0,sizeof(LINEINITIALIZEEXPARAMS));

	//populate the options
	LineInitializeExParams.dwTotalSize = sizeof(LINEINITIALIZEEXPARAMS);
	LineInitializeExParams.dwOptions = LINEINITIALIZEEXOPTION_USEEVENT;

	//call the LineInitializeEx function
	result = lineInitializeEx(&lineApp,NULL,(LINECALLBACK)&lineCallbackFunc,NULL,&numDevs,&tapiVersion,&LineInitializeExParams);
	if (result!=0)	
		printf("TAPI could't be Initialized"); 
	else printf("\n\nTAPI Initialized..");

	num = numDevs;
	printf("\nNumber of lines available to this app:  %d",(LPWSTR)num);

	result = lineNegotiateAPIVersion(lineApp,0,API_EARLY_VERSION,API_CURRENT_VERSION,&tapiVersion,0);
	result = lineGetDevCaps(lineApp,0,tapiVersion,0,lineDevCaps);
	//opening a line
	result = lineOpen(lineApp,0,&hLine,tapiVersion,0,0,LINECALLPRIVILEGE_MONITOR,LINEMEDIAMODE_DATAMODEM,NULL);
	if(result!=0)
		printf("\nLINE could't be Opened...");
	else
		printf("\nLINE Opened...");


TapiShutDown()
void WINAPI TapiShutdown() {
	result = lineShutdown(lineApp);
	if (result==0)
		printf("Line closed successfuly");
	else 
		printf("something went wrong"); 
}


and lineCallbackFunc().
VOID FAR PASCAL lineCallbackFunc(DWORD hDevice,DWORD dwMsg, DWORD Param1, DWORD Param2, DWORD Param3) {
	if (dwMsg == LINE_REQUEST) 
		printf("incomg line...");
}

In the main(), I just call these functions.
int _tmain(int argc, _TCHAR* argv[])
{
	TapiInitialize();
	Sleep(180000);
	printf("\n\nPress any key to close line....");
	getche();
	TapiShutdown();
	return 0;
}
Where am I doing something wrong??Confused | :confused:

modified on Tuesday, September 21, 2010 1:21 PM

AnswerRe: lineCallbackFunc not returning message..... Pin
Kushagra Tiwari21-Sep-10 2:29
Kushagra Tiwari21-Sep-10 2:29 
AnswerRe: lineCallbackFunc not returning message..... Pin
oggenok6421-Sep-10 2:50
oggenok6421-Sep-10 2:50 
GeneralRe: lineCallbackFunc not returning message..... Pin
AmbiguousName21-Sep-10 3:50
AmbiguousName21-Sep-10 3:50 
QuestionRe: lineCallbackFunc not returning message..... Pin
David Crow21-Sep-10 3:18
David Crow21-Sep-10 3:18 
QuestionApplication error Pin
raju_shiva21-Sep-10 1:12
raju_shiva21-Sep-10 1:12 
AnswerRe: Application error Pin
Cedric Moonen21-Sep-10 1:25
Cedric Moonen21-Sep-10 1:25 
GeneralRe: Application error Pin
raju_shiva21-Sep-10 1:38
raju_shiva21-Sep-10 1:38 
AnswerRe: Application error Pin
rp_suman21-Sep-10 8:38
rp_suman21-Sep-10 8:38 
AnswerRe: Application error Pin
yu-jian21-Sep-10 14:50
yu-jian21-Sep-10 14:50 
QuestionPath Pin
john563220-Sep-10 23:32
john563220-Sep-10 23:32 
AnswerRe: Path Pin
«_Superman_»20-Sep-10 23:47
professional«_Superman_»20-Sep-10 23:47 
AnswerRe: Path Pin
bleedingfingers21-Sep-10 1:04
bleedingfingers21-Sep-10 1:04 
GeneralRe: Path PinPopular
kakan21-Sep-10 1:44
professionalkakan21-Sep-10 1:44 
GeneralRe: Path Pin
bleedingfingers21-Sep-10 2:02
bleedingfingers21-Sep-10 2:02 
AnswerRe: Path Pin
Paul Michalik21-Sep-10 4:46
Paul Michalik21-Sep-10 4:46 
AnswerRe: Path Pin
rp_suman21-Sep-10 8:45
rp_suman21-Sep-10 8:45 
AnswerRe: Path Pin
yu-jian21-Sep-10 14:47
yu-jian21-Sep-10 14:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.