Jump to content
  • Advertisement
Sign in to follow this  

Win32 still worth learning?

This topic is 4239 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm willing to bet that there will still be a lot of similarities. Win32 is tough, but most of my projects only use the basic window creation, menus, and resources. I really think that with the new Window Forms, that Win32 will not be used as much. Of course somethings have to be used, but when you can create a game using Win Forms and managed DirectX in very little time it only makes sense to do it. Of course I still prefer using unmanaged DirectX, but after using XNA studio, I am starting to realize the benefits.

Share this post

Link to post
Share on other sites
If you're asking this because you want to make a window, and not because you're thinking of job resumes are similar, check out SDL. Pretty much the same functionality, but much nicer. You'll spend less time learning it, so if everything goes another way, less time wasted! However, it's quite nice, so you might not want to move on for a while. [smile] And as a possibly large bonus, it's cross platform.

SDL makes learning Win32 pretty useless, IMO. :D

Edit: BTW, I've never learned Win32, but that's because I've never needed to, and the code written with it that I've seen has been horrendous looking. I can't stand names like LPSTR or w/e, I can't remember.

Share this post

Link to post
Share on other sites
I've tried out SDL found it alot simpler but considering I want to learn opengl and directx I'm going to need win32 knowledge sooner or later. I guess if its being expanded then it is a good time to learn it.

Share this post

Link to post
Share on other sites
You definately don't need Win32 for OpenGL, SDL can do that with applaud. It might even be able to do DirectX, but I can't say I know. I believe I've seen a demo of DirectX on SDL, but that was a while ago, and I could easily be mis-remembering.

Share this post

Link to post
Share on other sites
Original post by namingway
Well I'm guessing win32 applications will still work on windows Vista but is win32 going to be replaced?

No because there are still things you cannot do in windows with managed code and need to resort to using win32.
For example in VB 2003 you needed to resort to using win32 just to play a sound from your vb app. Now in VB2005 you can use my object without resorting to win32 to do the same thing.
On other hand to determine service pack level you still need to use win32 in VB:

This step-by-step article shows you how to build the GetServicePack method.
Back to the top Back to the top
The OSVersion property, which is provided for obtaining operating system (OS) information, does not contain a member that provides service pack information. To determine what service pack is installed, you must call the GetVersionEx API function directly. Typically, it is better to avoid this practice; the .NET Framework provides access to the underlying API sets in a much more consistent (and easier to use) manner than by calling the individual API functions.

When you must call an API function directly, you can do this through the Interop layer of the .NET Framework. The sample code in this article gives a method, GetServicePack, that returns the service pack level.

NOTE: The OSVERSIONINFO structure contains a fixed-length string, szCSDVersion. Because fixed-length strings are no longer supported, you must provide the marshalling information for this member. Do this by using the attribute (denoted by <>) preceding the member name.
1. Open a new Visual Basic .NET or Visual Basic 2005 console application.
2. Open the code window for Module1.vb, and delete all of the code.
3. Paste the following code into Module1.vb.

Module module1
Private Structure OSVERSIONINFO
Dim dwOSVersionInfoSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformId As Integer
<VBFixedString(128), _
System.Runtime.InteropServices.MarshalAs _
(System.Runtime.InteropServices.UnmanagedType.ByValTStr, _
SizeConst:=128)> Dim szCSDVersion As String

End Structure

Private Declare Function GetVersionExA Lib "kernel32" (ByRef lpVersionInformation As OSVERSIONINFO) As Short

Public Function getServicePack() As String
Dim retvalue As Short
osinfo.dwOSVersionInfoSize = 148
retvalue = GetVersionExA(osinfo)
If Len(osinfo.szCSDVersion) = 0 Then
Return ("No Service Pack Installed")
Return (CStr(osinfo.szCSDVersion))
End If
End Function

Public Sub main()
End Sub
End Module

While Microsoft has been adding stuff to .net and vb language to cover older win32 function they haven't got around to everything and I doubt they ever will hence need to at least be familiar with win32.

[Edited by - daviangel on December 14, 2006 7:59:01 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!