Bork Bork!
 FAQ  •  Search  •  Memberlist  •  Usergroups   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 .NET sucks sometimes View next topic
View previous topic
Post new topicReply to topic
Author Message
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Sat Sep 17, 2005 12:14 pm Reply with quoteBack to top

I decided not to post this in bitch/moan/flame because only the geeks will get it.

I've been using the .NET architecture for a lot of client projects. The idea is really neat, and I like how you can do windows programming without a bazillion enumerations, *s, &s, etc. Now that it has proven insufficient for three different projects I thought I'd bitch, and also put out a warning. If you are thinking about using .NET for serious projects there will come times when you need to wrap functionality up in unmanaged (either visual basic or c++ 6) code.

So far, I have had to do this because .NET can not a) control the modem (TAPI), b) communicate via serial port (well ok it can but it's in beta and not for use in production environments) and c) establish a global hook to intercept windows messages for a process that your application does not own. Actually point c) exposed for me that *any* time you need to pass a handle/hinstance on yourself (as a dll) via something like LoadLibrary .. and that does come up from time to time when you're using WinAPI .. .NET will fall short. The dlls are not real dlls .. they're intermediary language that gets interpreted at runtime.

Time and time again when I need to get into the nitty-gritty .NET does not satisfy my needs. Just a word of warning. Other then the occassional d'oh! like this I do like .NET quite a bit.

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
suhmann
Uber-Geek


Joined: 03 Jul 2003
Posts: 580
Location: Philadelphia

PostPosted: Sun Sep 18, 2005 9:44 pm Reply with quoteBack to top

I have to agree with you on those points. It was primarily designed to be a new programing language with some backwards compatibility for the next generation of windows and we applications, which means you can atleast call your unmanaged code and thats about it. I am sure if you did some searching there are overly complicated articles to do what you want done. I have found that this problem exists in Java as well, though Java has already address a number of issues.

_________________
Our will is not our own.
It is merely a reaction upon our senses.
View user's profileSend private messageVisit poster's website
eddie_baby
The Geek Next Door


Joined: 02 May 2003
Posts: 2288
Location: between alpha and omega

PostPosted: Mon Sep 19, 2005 7:56 am Reply with quoteBack to top

You can use unmanaged code within a .Net excecutable or dll. See p 662 of the O'Reilly Programming C# book under pointers and ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vcwlkUnsafeCodeTutorial.htm
in your MSDN documentation. This may not work in all situations, but it may prevent you from having to go outside the framwork as often.

_________________
TH Defender of the faith since 1999.
View user's profileSend private messageAIM Address
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Mon Sep 19, 2005 9:07 am Reply with quoteBack to top

Using unmanaged code in your application .. using it in a .dll .. its all the same such that one needs to write unmanaged code from time to time. It just annoys me, I suppose, to go from this really clean and easy to understand syntax to the bazillion enumerations you get in VC++ 6. I *hate* doing Windows Programming and COM stuff in that IDE, especially when it is side-by-side with something that works easier.

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme :: All times are GMT - 5 Hours