TAPI
Please support our C++ advertiser: Programming Forums
![]() |
What do you mean "how"?
How I would do it would be
- STW for tutorials and examples
- Read the manual pages
- Try some examples
- Do some design work on the system I want to implement
- Write some code, then test it.
And so on.
Same as any other software problem really. The "TAPI" and "C++" isn't special in that respect.
How I would do it would be
- STW for tutorials and examples
- Read the manual pages
- Try some examples
- Do some design work on the system I want to implement
- Write some code, then test it.
And so on.
Same as any other software problem really. The "TAPI" and "C++" isn't special in that respect.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
By "How", I mean I looked for like an hour finding only stuff about .Net, and was wondering what the code would be, what libraries I might have to get, and so on. Like I said before, I'm using Dev-C++ 4.9.9.2, so anything that could be compiled with that IDE would help me a lot.
Last edited by TheBeast32 : Aug 20th, 2008 at 1:09 am.
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
--Martin Golding
C++ doesn't care whether your IDE is "Visual" or "Dev".
Again, if you've already found some C++ code, you're already like 95%+ of the way there.
Again, if you've already found some C++ code, you're already like 95%+ of the way there.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
How would you compile this in Dev?
C++ Syntax (Toggle Plain Text)
using System; using System.Collections.Generic; using System.Text; using JulMar.Tapi3; namespace TestTapi { class Program { static void Main(string[] args) { TTapi tapi = new TTapi(); TCall call = null; TAddress modemAddr = null; tapi.Initialize(); tapi.TE_CALLNOTIFICATION += delegate(object sender, TapiCallNotificationEventArgs e) { Console.WriteLine("New call {0} detected from {1}", e.Call.ToString(), e.Event); }; tapi.TE_CALLSTATE += delegate(object sender, TapiCallStateEventArgs e) { Console.WriteLine("{0}:{4} has changed state to {1} due to {2} - current={3}:{5}", e.Call, e.State, e.Cause, e.Call == call, e.Call.GetHashCode(), (call != null) ? call.GetHashCode() : 0); if (e.State == CALL_STATE.CS_INPROGRESS && e.Call == call) { Console.WriteLine("Dropping call"); e.Call.Disconnect(DISCONNECT_CODE.DC_NORMAL); } }; foreach (TAddress addr in tapi.Addresses) { if (String.Compare(addr.ServiceProviderName, "unimdm.tsp", true) == 0 && addr.QueryMediaType(TAPIMEDIATYPES.AUDIO)) modemAddr = addr; } if (modemAddr != null) { Console.WriteLine("{0} = {1} ({3}) [{2}]", modemAddr.AddressName, modemAddr.State, modemAddr.ServiceProviderName, modemAddr.DialableAddress); modemAddr.Monitor(TAPIMEDIATYPES.AUDIO); ConsoleKey ki = ConsoleKey.A; while (ki != ConsoleKey.Q) { // Flip the auto-destroy flag if (ki == ConsoleKey.D) { tapi.AutoDestroyCalls = !tapi.AutoDestroyCalls; Console.WriteLine("Set AutoDestroy to {0}", tapi.AutoDestroyCalls); } // List existing calls else if (ki == ConsoleKey.L) { foreach (TCall _call in modemAddr.EnumerateCalls()) { Console.WriteLine("Existing call found: {0}:{1}", _call, _call.GetHashCode()); _call.Dispose(); // Go ahead and dump it } } // Create a new call else { call = modemAddr.CreateCall("5551213", LINEADDRESSTYPES.PhoneNumber, TAPIMEDIATYPES.DATAMODEM); Console.WriteLine("Created new call {0}:{1}", call, call.GetHashCode()); try { // This will fail if existing call interface is still around (i.e. not disposed) call.Connect(false); } catch (TapiException ex) { Console.WriteLine(ex.Message); } } Console.WriteLine("Press a key to try another call.. Q to quit"); ki = Console.ReadKey().Key; } } // This will destroy any outstanding interfaces tapi.Shutdown(); // Call should be disposed here.. state will be CS_UNKNOWN if (call != null) Console.WriteLine("{0} {1}", call, call.CallState); } }
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
--Martin Golding
I thought you have C++ examples as well as .net examples.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
OOOOOOOPSSSSSSSSSSS, I'm StUPID. No i didn't. I don't know why I put that........

I'm an idiot.......................

I'm an idiot.......................
Last edited by TheBeast32 : Aug 20th, 2008 at 1:10 am.
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
--Martin Golding
After a brief search, some source code in C++
http://www.julmar.com/tapi/
http://www.julmar.com/tapi/
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
Where can I get the SDK for the samples here http://www.tapi.info/default.aspx/TAPI/PSDKSamples.html
Last edited by TheBeast32 : Aug 20th, 2008 at 3:33 pm.
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
--Martin Golding
![]() |
Similar Threads
Other Threads in the C++ Forum
- Send data on a serial port (C++)
- Need TAPI component (C++)
- System 32 Coming Up at Startup (Viruses, Spyware and other Nasties)
- check if my modem is TAPI (PCI and Add-In Cards)
- Another Trojan.Bookmarker.Gen (Viruses, Spyware and other Nasties)
- www.lookfor.cc search still buggin me (Viruses, Spyware and other Nasties)
- Telephony using C++ (C++)
- hijackthis log...I need help please (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: String Concatetation
- Next Thread: help implementing singly linked list
•
•
•
•
Views: 1358 | Replies: 10 | Currently Viewing: 1 (0 members and 1 guests)






Linear Mode