3 ms·
Good stuff. Good to know. Thanks, I needed that. Always wondered. Good explanation, 20 years late for me to read this, but better late than never. Yes, it
by graycat 9y ago
Good stuff. Good to know. Thanks, I needed that. Always wondered. Good explanation, 20 years late for me to read this, but better late than never.
Yes, it sounds like a COM file, with no relocation dictionary, etc., would have to be loaded at the same virtual memory address. IIRC one of the OP comments mentioned this.
Uh, more of the same, piled higher and deeper?
Okay, for my startup I decided to use the .NET Framework 4 with Visual Basic .NET and the usual acronyms SQL (structured query language) Server, ADO.NET (active data objects for using SQL Server), ASP.NET (active server pages for writing Web pages), IIS (Internet information server, which actually makes the TCP/IP calls for moving the data on the Internet and runs my VB.NET program that writes the Web pages), etc. Okay.
But eventually it dawned on me that there is a lot of code running on my Windows machine that very likely is not from Visual Basic and .NET; I'm concluding that there is an older, say, Windows 95, 98, NT development environment based on C++ and a lot of library calls, a message queue for inputs, some entry variables and call backs to them, and quite a lot of functionality not also in .NET.
E.g., when my HP laser printer quit and I got a Brother laser printer, my old HP/GL (Hewlett Packard graphics language, a cute, simple thing for printing and drawing on pages) program to print files didn't work -- the Brother printer didn't do with HP/GL just what my HP printer did.
So, via .NET I wrote a replacement for such simple printing. Well, for writing the characters to the page, object, image, whatever it was (I don't recall the details just now), all I could see to use was some GDI+ (graphical data interface or some such?) calls, but those seem not to be the usual way old Windows programs write to paper, graphics files, or the screen and instead there's something else, maybe back before .NET, and I don't know what that older stuff was. E.g., the GDI or whatever it is didn't let me actually calculate accurately how many pixels horizontally a string of printable characters would occupy when printed and, thus, all my careful arithmetic about alignment became just crude approximations -- no doubt Firefox, Chrome, Windows Image and FAX Viewer, etc. all use something better, more accurate.
So, what am I missing? Am I supposed to get out some 20 year old books by Petzold or some such, get a Windows Software Development Kit or some such, review C and C++, get lots of include files organized, etc., start with some sample code that illustrates all the Windows standard things of a standard Windows app or some such?
Okay, but it appears that .NET does not yet replace all that old stuff?
I mean, is it possible to write a full function Windows app with just .NET, VB.NET/C#?
Q 1. What really is that old stuff? Where is it? Are there good tutorials? E.g., if we are to explain COM files, then let's also point to explanations of some of the other old stuff also still important?
Q 2. Is the functionality of that old stuff, for user level programs, maybe not for device drivers, by now all available via .NET but I've just not found it all yet? If so, where is it in .NET, say, for graphics and printing the .NET presentation thingy or whatever?
The code for my startup looks fine, all seems to work, does all I intended, but still I wonder about that old stuff. E.g., eventually I noticed that my favorite editor KEdit, apparently like
any well behaved old standard Windows program, will let me print a file. And the printing works great! I get a standard Windows popup window that lets me select font, font size, bold or italic, etc., and it works fine with the Brother printer. KEdit knows some things about writing to a printer I didn't see in .NET. So, with just .NET, I'm missing a lot of Windows functionality?
- 0x0 9y agoThe "stuff" you are asking about is the original win32 API, which as far as I know is still the bread and butter for everything running on top of a windows install. .NET and its various frameworks like WPF or WinForms or GDI+ may be reimplementations of GUI components instead of reusing existing GDI (part of Win32) components but certainly Win32 is the gateway to anything getting done still.
- graycat 9y agoThanks. I got the impression that GDI+ is some slightly off on the side, goofy thing good for some things but not the main way, say, C++, Win32 programmers at Mozilla write to the screen or a printer, that there are other, really in most ways, better ways in Win32. So, looks like I should get some documentation on Win32, scan it, see what the major functionality is, and then see if I can find that functionality in .NET class wrappers or some such so that I don't have to do mud wresting with C structs or C++ classes. I just did a Google search on some of these keywords and found that Microsoft is now awash in developer videos, are supposed to download as MP4 and view in Windows Media Player, now talking about not just "productivity" but "creativity" in apps. Hmm .... It took me 30 minutes of mud wrestling, two e-mail messages, lots of retrys, a phone call from one of their robots, etc. just to "sign in". They had up a page with radio buttons or round check boxes or some such with a lot of gibberish but no instructions about what the heck I was supposed to do with that page. Typical -- just try it and find out! So, to try it, just run the mouse over and click on everything in sight, hope don't cause the universe to shrink to nothing, and see what can do. With enough such exploratory clicking, I was able to "sign in". Hmm .... Microsoft is failing in basic, old UI lessons about being clear what are asking users to do, getting a low grade in basic functionality, but asking their devoted, dedicated developers to move from "productivity" to "creativity", e.g., where a screen now looks like some "acrylic" surface with some nice emotional impressions? Hmm. Uh, Gates, buddy, art is one heck of a challenging field to get right! Not so easy to keep up with Michelangelo, Bernini, Bach, Wagner, Degas, Renoir, etc.! Why don't you plan to return to art and creativity after you are able to get sign ins on your Web sites working and to write documentation that does well explaining your current work including .NET and Win32? PS Okay, at Google I started typing "Win32 dev ..." or some such and right away got a little window of a search for Win32 development tutorials, or some such. Sooooo, that search is very popular! I picked Microsoft page https://msdn.microsoft.com/en-us/library/bb384843.aspx https://msdn.microsoft.com/en-us/library/bb384843.aspx which is Walkthrough: Creating WindowsDesktop Applications (C++) which looks like a quite good start! By now I've used enough Win32 applications to appreciate that Microsoft has had a framework, starter program, standard first program or some such with all the key stuff for printing, using the system clipboard, getting data from the mouse and keyboard, etc. All that stuff is rock solid standard so don't program it, maybe even don't try to study it, and just USE it as it is because it is needed and it WORKS and getting the same just from documentation might require massive mud wrestling! ] The page does say that Win32 is not the up to date or some such way to develop. Okay, sure, for 64 bit addressing, can believe that Win32 won't work! So, this Microsoft comment seems to imply that can get all the Win32 functionality and more in 64 bit addressing with C#, VB.NET, etc. Okay. Maybe if I keep reading I'll see how to do that, too! PPS Yup, suddenly a little more of the world is starting to make sense! Just Google search Win32 .NET right away gave https://msdn.microsoft.com/en-us/library/aa302340.aspx https://msdn.microsoft.com/en-us/library/aa302340.aspx with Microsoft Win32 to Microsoft .NET Framework API Map with "applies to" Microsoft® .NET Framework version 1.0 or 1.1 which is essentially just what I hoped existed! And the page does fairly strongly suggest that anything that can be done in Win32 can also be done .NET! And from the 1.0 and 1.1, that's old, that is, apparently .NET offered essentially all the Win32 stuff right from the beginning of .NET! Since my code was written with .NET 4, I should be able to include in my code essentially any Win32 functionality I want! GOOD! Thank you Microsoft! Looks good! Took me a while to find, but, again, looks good. And it's clear from how Google responded I'm not nearly the first looking for that info! Great! Now I don't have to get out a 20 year old book from Pezold! And I get to continue to f'get about C and C++ and stay with VB.NET, or C# if Microsoft insists -- I hope they don't drop VB.NET! Good! And it's a nice looking Web page, printed, 64 pages long, that is, not short! Maybe I've now answered my own questions!