|
|
Hi,
me a student of uet(pakistan) in software engg.
i am developing my final project as tapi (VOIP in our uni)
i need some codes especially when i dial the telephone my pc read this telephoen n record it
,display some greeting,n then make call via net.
I ve lot of confusions plz anybody help me.
1-shuld i ve to install tapi sdk for using tapi
2-in MSDN voip codes & path is as ...
%_WINCEROOT%\Public\DirectX\SDK\Samples\VOIP\VOIPDEMO...from where i can get it(n can i use these samples in my pc having xp window)..???
can some body plz help me n send me sapi n tapi code or some links of sites which r really helpful!!!
thanx a lot
regard
maria
looking for ur kind favour at
maria_uet2003@yahoo.com
maria
|
|
|
|
|
|
Why does ReadFile function hang after successfully reading a byte from port?
|
|
|
|
|
You must give more detail about the problem if you want help.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
I wrote a program in Visual C++ to implement Serial Communication. The program compiles successfully and runs also. After initialising the ports, when a byte is written to the port, on one computer and is read on another computer (which is connected to the earlier computer) the code works. But when I try to read the port again the program simply hangs. The only way out is then to stop the debugger.
I used the initialisation code provided in a article posted on this site itself (the one written by Eshwar). But to implement read and write I only used the functions ReadFile and WriteFile respectively.
|
|
|
|
|
If there is no data coming on the port anymore and if the read timeout of the port is set to infinite, the ReadFile function will wait until data is received (thus it seems to 'hang').
To change this behavior, you can use the SetCommTimeout function.
But I suggest you to read a little more documentation about how serial ports work because you seem to lack some important informations there...
Hope this helps
|
|
|
|
|
Respected Sir,
I read your suggestion and tried setting the timeout to a lower value. I set it to the following values :-
commTimeout.ReadIntervalTimeout = 10;
commTimeout.ReadTotalTimeoutConstant = 10;
commTimeout.ReadTotalTimeoutMultiplier = 1;
commTimeout.WriteTotalTimeoutConstant = 10;
commTimeout.WriteTotalTimeoutMultiplier = 1;
Still no use. The ReadFile function makes the program hang. Please can you suggest some sample values.
Thanking you.
|
|
|
|
|
Still not enough information. It is well known that ReadFile and WriteFile both work. The problem must be in your code. Post some sample code.
It may be simply that you call ReadFile again when there is nothing for it to read; what if you send it another byte from the other computer?
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
In non-overlapping mode, when you call ReadFile, it will wait until it reads a byte at least. It also depends on the input size as I remember.
You really should not call ReadFile or WriteFile in your main thread, you better use another thread to do this, which will keep your program responding, and it is better to use proper time-out values for the port, so that ReadFile will fail after a certain amout of time if nothing is read.
Does that do any help?
this is this.
|
|
|
|
|
Hiii
i have used ADO for linking my database in vc++...
how can i add a function which searcges for a particular value in a field....
please help
manav
|
|
|
|
|
Use an ADO recordset with a query like
"SELECT * FROM [Table] WHERE [FIELD]=value;"
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
i doubt you code this directly in C++...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
No, of course not!
You use a recordset, (coded in C++) which needs a query string like the one I showed.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
|
Hi
This is again a problem with thread. The thread is affected by programs running on the background. It is affected by the programs showing in the system tray. Is there any way to close all programs and processes other than my application and related processes and threads.
Help Me Soon.
Regards
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
|
|
|
|
|
Sreekanth Muralidharan wrote:
Is there any way to close all programs and processes other than my application and related processes and threads.
EnumProcess and then Use WM_QUIT to kill Process other than you!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi Alok
You are back again!! Glad for me !!
Thanks a lot. Will check that and shoot you a reply.
Shall we now open bottles?
Regards
Sreekanth Muralidharan
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
|
|
|
|
|
Sreekanth Muralidharan wrote:
Shall we now open bottles?
Your Wish
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi Alok
See.. If I am setting the priority of the application process as a REALTIME_PRIORITY_CLASS in its OnInitDialog() function (if not in this function, where?) and setting the thread created by that application using SetThreadPriority() (calling in the thread itself) to TIME_CRITICAL_PRIORITY level , what would be the priority of the thread that I have created? Can any process or thread interrupt the thread I have created?
Regards
Sreekanth Muralidharan
Hyderabad
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
|
|
|
|
|
Sreekanth Muralidharan wrote:
TIME_CRITICAL_PRIORITY level , what would be the priority of the thread that I have created? Can any process or thread interrupt the thread I have created?
According to MSDN, REALTIME_PRIORITY_CLASS :-" A thread with a base priority level above 11 interferes with the normal operation of the operating system. Using REALTIME_PRIORITY_CLASS may cause disk caches to not flush, hang the mouse, and so on.
"
So i believe no process or thread wil interrupt your high priority thread
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I think I'll never buy products from your company .
Seriously, I don't think this is a good solution ! Maybe the user doesn't want that your program kills its own applications don't you think ?
A better way would be to solve the problem itself. Maybe this is due to thread priority or something like that.
|
|
|
|
|
Hi Cedric
What you said was perfect. But I am using a thread with a real time priority for that. But still the disturbances happen.
Regards
Sreekanth Muralidharan
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
|
|
|
|
|
Hi:
I overload the CToolBar class , and process the default TBN_GETINFOTIP event to dynamicly changge the tips.
( ON_NOTIFY_REFLECT( TBN_GETINFOTIP, OnGetInfoTip)
the way works well. Then I create a toolbar in the statusbar in one of my project, but this way doesn't work at all. I couldn't get the OnGetInfoTip event form the toolbar created in the statusbar now. Why? how could I do?
Thanks
Benben
|
|
|
|
|
Get the tooltip control associated to your toolbar (MFC : GetToolTips()) and call the RelayEvent() function once after the init of the toolbar.
~RaGE();
|
|
|
|