|
-
Nov 22nd, 1999, 11:47 PM
#3
Thread Starter
Hyperactive Member
I tried a couple variations of your suggestion and got errors or no information. I must be implementing it wrong. This is what I did:
In a module I put:
Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByVal lpVersionInformation As OSVERSIONINFO) As Long
Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' Maintenance string for PSS usage
End Type
Public myosversion As OSVERSIONINFO
in my form code I put:
GetVersionEx myosversion
Text1.Text = Text1.Text & "buildno" & myosversion.dwBuildNumber
With this code i get errors "user defined type may not be passed byVal"
VB help suggested removing 'byval' from the declaration. When I did that, all elements of the 'type' returned '0' except szCSDVersion which returned a null string.
What am I doing wrong?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|