I am making a C program to send AT commands to a mobile phone from my pc. In that, I want it to dial a number but after a delay of some time say 10 minutes. How should I do this(I am using WriteFile command to send the dial command ATD)? Also, during this time delay I want to be able to do something else & when the time is up, I want the program to interrupt my current task so that it can dial the given number. Please tell me how I can do this.
champnim 6 Light Poster
Recommended Answers
Jump to PostIn MS-Windows you will probably want to have two threads -- one thread for dialing and the other thread to do other things. The Sleep(int milliseconds) is available from windows.h
Jump to Post>>Is CreateFile equivalent to using a CreateThread
No. CreateFile() works with files and CreateThread() creates new threads. They are two completly different animals.
>>I would be highly obliged if you could give me a link with some samples of multi-threaded applications
There are billions of examples on the …
Jump to PostAfter calling CreateThread() the operating system will add the new thread to its thread scheduling list and give each thread CPU time. So thread1 will get a slice of CPU time, then when that time slice expires the os will halt the thread and give another thread some CPU time. …
All 11 Replies
agartrell 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
champnim 6 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
champnim 6 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
champnim 6 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
champnim 6 Light Poster
champnim 6 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.