Click to See Complete Forum and Search --> : Development tools recommendations


Ken Tozier
February 28th, 2006, 02:08 AM
Hi

I'm a long time Mac developer who needs to write a small NT daemon for part of a larger project. I've never even attempted a "Hello World" program for a Microsoft based product, so I'm a bit lost on what I'll need to get the job done.

A little background:
I know C very well, am proficient in Objective C, Javascript, PHP, CSS, MySQL etc. I've dabbled in C++ and understand the basics but have never actually written anything of consequence in C++. Never even crossed path with a C# program and have mostly avoided Java. (A little dabbling but didn't like it at all)

The project will be a daemon (or whatever these are called on NT) that monitors a few directories and writes information on directory and/or file changes to an SQL database. It seems like this should be relatively straightforward but I don't know anything about Windows, NT or SQL 2000 so there may be a lot of hidden gotchas lying in wait.

Here are my main questions:
- First off, is writing an NT daemon hard to do?
- Are there SQL 2000 APIs that are accessible from a daemon? Or would I have to do a lot of low level socket/connection stuff to connect and write records to a database?
- Could I write the daemon entirely in C? Or does Microsoft require knowing C++/C# nowadays?
- Which of Microsoft's (or third party) IDEs would be the best choice for this small project?
- Do these IDEs come with all the necessary libraries to write the above mentioned daemon?

Any help/info/book recommendations/links would be greatly appreciated.

Thanks

Ken

Sahir
February 28th, 2006, 11:36 AM
In the Windows world a "Daemon" is called a "Service". Doing it in C is going to be a lot of hard work. Particularly if you are not used to the Windows API. I would recommend doing it in C#. It would take about 10 working days to learn C# and create this application you described.

Ken Tozier
March 1st, 2006, 01:35 AM
In the Windows world a "Daemon" is called a "Service". Doing it in C is going to be a lot of hard work. Particularly if you are not used to the Windows API. I would recommend doing it in C#. It would take about 10 working days to learn C# and create this application you described.

So I should go with the Visual C# development package? http://msdn.microsoft.com/vcsharp/

For the time being, I just need to learn the bare minimum necessary to write the "service" without getting too bogged down in other details of Windows programming. The project overall is pretty big and I'm the only developer so I need to keep it simple.

I assume there are basic shells and/or sample code for different project types (ie applications, libraries etc) so would most likely just use one of those and modify it here and there to make it do what I need.

Ken

Sahir
March 1st, 2006, 07:16 AM
Yep! :thumb:

Here's a link to help you on your way

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboricreatingconfiguringwindowsserviceapplications.asp

Sam Hobbs
March 2nd, 2006, 02:35 AM
The project will be a daemon (or whatever these are called on NT) that monitors a few directories and writes information on directory and/or file changes to an SQL database. It seems like this should be relatively straightforward but I don't know anything about Windows, NT or SQL 2000 so there may be a lot of hidden gotchas lying in wait.I knew very little about Windows and even less about Windows programming when I was asked to develop a Windows Printer Device Driver. The driver sent data over a SCSI interface and did all the bit-twiddling to control the host adapter. I say that to say that it is possible to learn stuff like that. In my case, the internet was not in use as it is now and essentially did not exist. I did a lot of reading of the Windows DDK and SDK documentation and was not able to ask others about Windows programming.

You can do what you need to do, but you will need to also do a lot of reading and learn how to use these forums effectively. I said in your previous thread that your question is Windows-specific and therefore should be in a Windows forum. I also said that a Unix daemon is a Windows Service.

You can download and install the Windows SDK for free, or get a CD-ROM copy for the cost of shipping. The documentation is there, including samples.


- Are there SQL 2000 APIs that are accessible from a daemon? Or would I have to do a lot of low level socket/connection stuff to connect and write records to a database?A Windows Service is a Windows "Console" program that uses the Windows SDK the same as other Windows console programs, except a service has special functions it must use and a service has limitations, especially security limitations.
- Could I write the daemon entirely in C?Yes.- Which of Microsoft's (or third party) IDEs would be the best choice for this small project?Microsoft has just one IDE. There are various versions that have various levels of additional software, but the basic IDE is the same.

You really should ask this question in a Windows forum. If you continue to post here, they will probably move your question elsewhere.- Do these IDEs come with all the necessary libraries to write the above mentioned daemon?Yes, of course. The libraries are also available with the SDK (downloadable for free or on CD-ROM for the cost of postage).Any help/info/book recommendations/links would be greatly appreciated.The SDK is all you need. For Windows programming, there are many books that can help, but you can find everything you need in the SDK, including documentation. I would provide links, but you really should ask in a Windows forum.

Sahir
March 2nd, 2006, 04:07 AM
You can download and install the Windows SDK for free, or get a CD-ROM copy for the cost of shipping. The documentation is there, including samples.
Visual Studio 2005 Express Edition is also free.

Sam Hobbs
March 2nd, 2006, 04:40 AM
Visual Studio 2005 Express Edition is also free.Yes, and I did think about mentioning that but I forgot to and I assume that Ken would have discovered that. If the Express Edition can satisfy the requirements, then it is good if knowing about it allows Ken to proceed without investing any funds. I think there are separate Express Editions for ezch of the languages, and if so then the C# version would be much smaller than the other versions, since the other versions are not available as separate languages.

Ken Tozier
March 2nd, 2006, 05:01 AM
Many thanks for the replys.

I was especially glad hear about the "Windows SDK" as the $2,500 price tag on the Visual C# package nearly made me choke.

Sorry about posting here (incorrectly) I was under the mistaken impression that every forum on this site was more or less devoted to developing for and with Microsoft products.

Ken

Sam Hobbs
March 2nd, 2006, 05:29 AM
Sorry about posting here (incorrectly) I was under the mistaken impression that every forum on this site was more or less devoted to developing for and with Microsoft products.Take a look at the index of forums. The C++ forum explicitly excludes VC and explicitly includes Linux. The description of this (the General Developer Topics (http://www.codeguru.com/forum/forumdisplay.php?f=19) forum) says that this is the forum if the topic "doesn't fit elsewhere".