January 2005 - Posts

TAPI functionality is not supported in the Managed World!

I had written a Dialer Application based on the Windows Phone Dialer that would pick-up numbers from a database and would dial 'em. From a CRM perspective, I also logged some stats about the telephone session. I did the coding in VB6 in the traditional way, by doing an API call to the tapiRequestMakeCall function of the “TAPI32.DLL”. My application would invoke the Phone Dialer and pass the phone number and callers name as the arguments. It works cool on Windows 98 and Windows 2000. I ran the same stuff on Windows XP. The Phone Dialer in XP is an updated one and supports both a Phone Call as well as an Internet Call. I need to prefix the numbers that I would be dialing by 0 (because I have a PBX). When I supply the parameter as “0, 24565687” as the number to be dialer, the dialer assumes that this is an internet call. I require the comma to introduce a delay before dialing the actual number because the PBX needs a second to switch to cease the PSTN line. This is quite irritating especially after I found out that when I dial the number manually in Phone Dialer (same number), it treats it as a Phone Number and does the job well.

With this problem, I thought that I will port my dialer to .NET. It all came to a halt when I found this KB article, which says that TAPI functionality cannot be implemented in managed code.

The reason:
Because of the complexity of the
TAPI 3.x Component Object Model (COM) interface, the managed wrapper that is created by Microsoft Visual Studio .NET does not work. Therefore, you cannot call TAPI functionality from managed code.

The solution:
COM Interop. Hmmm... There is always a solution. :-)

Interesting note:
All the TAPI 2.x data structures are based on the DWORD data type. TAPI 2.x also requires heavy use of pointers. Therefore, TAPI 2.x functionality is difficult to use from any language other than the Managed Extensions for C++. Offlate I have been reading about the Managed Extensions for C++, which is pretty cool.

with 0 Comments

Security - the need of the hour

I downloaded FreeSCO (Free ciSCO) a soft-router with firewall capabilities. I was on the lookout for a firewall, prefereably something which could be configured on a diskless PC. I preferred a diskless PC because of two reasons - easy and hassel free harware setup & not so easy for hackers to sneak in. Mr.Jayakrishna had suggested the use of FreeSCO quite sometime back. Now that I am getting a broadband internet connection, I definitely require something more than just a Zone Alaram. One can easily setup a custom firewall with two layers of firewalls. A FreeSCO box can be in the outer layer with an NT machine in the inner circle.

FreeSCO is an open source program that can run on a 1.44MB floppy disk and also it comes with lots of cool features and customizations that can be done. Being a command line utility it is not very user-firendly. All you need to do is to download FreeSCO and make a Floppy disk copy of the FreeSCO setup files. It is based on a 2.0.39 Linux kernel. And a sad part of it is that you need to tinker around with its code if you need to get internal modem support for it. I havent ventured too much into that direction but Skp was telling that there is a patch available for it. Yeah when I say modem, I reffered to a dial-up modem. It does support Leased line, Cable, DSL connectivity too. Support for PPPoE is also built into it. Another cool feature is that it has a web control pannel using which you can login from anywhere and control your firewall/router remotely. It can be configured as webserver to serve simple HTML content. Simple and cool implmentation of Linux.

Yeah obviously, it cannot be compared to a CISCO PIX or Checkpoint, which are real good enterprise ready and highly reliable products. Probably this is one drawback I see when you speak of many open source projects. They are not complete in the sense that not all features are built into it. Bug-fixes are a slow process. So if you wanna get a simple home-made low cost firewall, just go in for FreeSCO.

with 1 Comments

Imagine Cup 2005 - "Imagine a world where technology dissolves the boundaries between us.."

Imagine Cup being one of the major global competitions for students hosted by Microsoft definitely draws the attention of anyone interest in computers, software, graphics and game programming.

I learnt about IC an year or more back that was when the IC 2003 was on. I hadnt worked on .NET at that time and I always thought that it is only for the geeks out there. "Change" is what is driving everything today. I saw the IC 2005 video when Mr.Tyson Dowd visited Bangalore and he spoke about IC '05. I still hadnt made-up my mind whether or not I should participate. Finally when the Round 1 dates for India was nearing, I teamed-up with Sabarish, Sharath and Deepthi Rao and we decided to get into it.

Round 1 is about a chess program, wherein we are given an
SDK and we are supposed to code for a function to find the checkmate move. It is definitely a good task to do but I felt that we are wasting time when we think of what participants in other countries would be doing. They would be working on their Software that would be submitted for the finals. We are stiil writing some crappy code for a chekmate. Phew...

After lots of discussion amongst ourselves we decided to start off with a brute-force method to get cracking with the program. After facing a hell lot of problems with MovePiceUnconditionally, we chaged our approach and now our program seems to be working fine except that it needs more tuning for performance. I read in the spoke "...so that you can save some precious nano seconds..." Oh. Please I wasnt thinking in nano seconds to compute the Checkmate in 1 move. The SDK is undoubtedly crappy in terms of ease-of-use, clarity and in some cases even the functionality.

Inspite of the fact that my exams are going on, I am not able to resist from "Spoking" (as in visitng theSpoke and Poke to see whats up). I also decided to make a program that will test the code that we write for different TestCases. After having some problems with loading different XML files (which contain the position of the different pieces) I finally have a working verion of the tester, which all of us will be using. It would also help our team to test for different cases and easily store & forward the results of the test.

One of the test cases:

<ChessGame>
<White>
<King HasMoved="True" Position="b7" />
<Knight HasMoved="True" Position="e7" />
<Knight HasMoved="True" Position="f6" />
</White>
<Black>
<King HasMoved="False" Position="d8" />
</Black>
</ChessGame>

theSpoke was hot with lots of discussions about whether or not people should 'openly' post the strategies that they are using in their solution and also some of them wanted to even post their DLLs!! Sriram said it right... Why dont they post the code itself if they want to really help someone?...

Lots happening for IC... India stands at No.2 in the number of registrations for IC too!
Yo!

with 2 Comments