473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Win32 or .NET and compilers

drhowarddrfine
7,435 Expert 4TB
I have to write/get some code to poll a linux server and securely download a web page (or text file) and print it on a remote XP computer's printer. I have not done any Windows programming in years but, after doing a little research, I think I found enough on MSDN to put this together. However, it's the Win32 API, which I am most familiar with, using WinHTTP.

So I'm thinking that, even though I've never used it before, I would like to future proof this little executable by using .NET, but I don't want to have to go through a long process of learning the .NET framework ins/outs when I'm sure I can get the Win32 version done relatively quick. Pointers on how to do that?

Since I think I know I can do it in Win32, is there a way to convert it to work with .NET, or is there no advantage or method to that?

I have Visual Studio, 2004, I think, but never used it and I don't think it works with .NET(?) and I'd rather not install it just for this, so I can download VS Express(?) or just get the command line compiler from the SDK.

(I just groaned because I remember I have to install all that. I wonder if I should just go back to my assembly roots and do it there cause I don't need the whole SDK. But I digress.)

EDIT: I just clicked over to another page and read something. To communicate with a web server, would my customer have to be using XP Professional or will Home do? I think he has Pro but not sure.
Oct 11 '08 #1
8 1293
Curtis Rutland
3,256 Expert 2GB
Well, you can use the Win32 API inside a .NET program using DllImport, but many of the methods that they offer are implemented natively in managed code. Are you planning on using Visual C++, C#, or VB.NET? There is no Visual Studio 2004. 2k3, 2k5, and 2k8. The express editions should do what you want.

One thing to look into would be the object HttpWebRequest. This is part of the .NET framework, and can send web requests and receive web responses. I must confess I've never tried to implement this securely, so I dont know if that will work for you, but it's worth looking into.

I don't see how the version of XP would limit making requests to web servers? You need Pro to install IIS, the windows web server, but I don't think it will matter for what you want to do.
Oct 11 '08 #2
drhowarddrfine
7,435 Expert 4TB
Well, you can use the Win32 API inside a .NET program
I wouldn't know what makes a .NET program other than using the framework. Is the only difference that you are making .NET objects instead of Win32 API calls?
Are you planning on using Visual C++, C#, or VB.NET?
The last time I did anything on Win I coded in assembly language with the SDK and compiled with masm. I do recall compiling something when .NET came out but, again, used teh compiler that came with the SDK. If anything, I used straight C with the C++ compiler.

I read about C# once. Have no use for VB.
There is no Visual Studio 2004. 2k3, 2k5, and 2k8.
Well, I've got something fairly recent.
You need Pro to install IIS, the windows web server, but I don't think it will matter for what you want to do.
THAT is what sent me to 'nix years ago.

I didn't know if .NET would prevent you from accessing the 'net for any strange reason based on the version you were using. I'll look into the object you mentioned, too. I'm concerned that, for what should be a simple thing, the setup is going to be long and arduous.
Oct 11 '08 #3
drhowarddrfine
7,435 Expert 4TB
Holy Mother of God!! I just looked at .NET. How do you get anything done with that?! How many years must be devoted to figuring how to write a char to the console?! No wonder Vista is such a bloated pig. I put a crucifix in front of the screen and draped a rosary over it. (And I'm not even Catholic!)

Has anyone heard if Microsoft is going to kill off the Win32API any time soon? I'll just write it with that for now and spend a year or two trying to figure out .NET and and attempt to keep it under a gigabyte.
Oct 12 '08 #4
Curtis Rutland
3,256 Expert 2GB
It's big, but it takes away very much of the manual work of programming. Building GUIs is a snap, compared to C and C++. And the apps can be much lighter than Java, due to the JIT compiler. It's a give and take situation. The Framework is quite large, but you only install it once every version (which come out years apart, and it provides for console, forms, web (both client and server), web service, and windows service programming, and is still growing. It's a whole different philosophy than C programming. You can get as granular as you want, allocating memory manually and using pointers if you want, but you don't have to, because most of that work has been done and wrapped up in nice, easy packages. Plus, the apps aren't that heavy because the whole framework isn't loaded, just the parts that you need, when you need them.

C#, by the way, is similar to Java, in case you wanted to know. Very object-oriented.

AFAIK, they aren't planning on getting rid of the Win32 API for a while.

Printing a char to the console is as simple as Console.Write('a') although I understand the point you were driving at. .NET is actually far simpler for a newbie to pick up, but it's easy for them to get lost in all the Framework and never understand the nuts and bolts of what their programs are actually doing.
Oct 12 '08 #5
drhowarddrfine
7,435 Expert 4TB
It's big, but it takes away very much of the manual work of programming.
Before or after typing System.Network.Console.OS.File.Writing.What?.IForg ot.What.I.Was.Doing(Object.Of.This WhoKnows)?
Oct 12 '08 #6
Curtis Rutland
3,256 Expert 2GB
Well, like I said, a different philosophy.

Luckily enough for both of us, there is room for (and a market for) several kinds of programming.

I'd be more than happy do debate the benefits of each, but let's do that in the cafe, shall we? ;P
Oct 12 '08 #7
drhowarddrfine
7,435 Expert 4TB
Oh, there's no question that the philosophy is "different" but from what I can see, .NET is only for those large companies that can afford to throw tens or hundreds of programmers at it and have each specialize in a certain area. During my search, I read that Microsoft doesn't even use it when they could/should.

EDIT: So after an hour of hunting around for a basic "intro" to all this that doesn't tell me everything but what I want to know, I might be able to puzzle something together after all. I'm sure I'll pop in with questions. I don't need this for a while, and I have to install XP on one of the "upgrade" boxes someone gave me.
Oct 12 '08 #8
Curtis Rutland
3,256 Expert 2GB
Well, I have to disagree with you there, from personal experience.

My company has one (well, one and a half, since I occasionally do development for them) developer, a C#.NET dev. He, in a month and a half, completely migrated our data entry system from RPG/AS400 to ASP.NET/MS SQL with only the help of a SQL DBA to set up the database.
Oct 12 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: john townsley | last post by:
is this a place to ask question for win32 apps (no MFC) with c++
82
by: zardoz | last post by:
I've got this problem: unsigned long long lTemp; char cLargeNum="1324567890"; sscanf(clargeNum,"%llu",&lTemp); which under Win32 isn't working*. My program needs to compile under posix so...
24
by: Dave | last post by:
I understand that VS.NET is supposed to compile native Win32 apps that do not require the .Net runtime. If that's the case then there is something else from the VS200x package that is required. ...
14
by: vittorio | last post by:
While I can compile the program below under freebsd via a simple: gcc prog1.c -o prog1 and it runs smoothly, I'm experiencing annoying problems with lcc-win32 under windows xp pro. In fact, under...
14
by: John | last post by:
My friend told me that his company will migrate the VC++ win32 applications to C++ .NET windows applications. I don't understand why since currently Microsoft only supports .NET on windows...
4
by: Kendall Bailey | last post by:
A shot in the dark. I have a C++ DLL that I'd prefer not to recompile. It's compiled also on a Unix platform as a shared object. It has static variables holding time zone Daylight Saving rules. ...
67
by: Nimmi Srivastav | last post by:
Apologies if my cross posting has offended anyone.... For a pure hobbyist C/C++ programmer, who wants to develop applications to run on Windows, what would be a better choice to install: Visual...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.