Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Detect Windows Version on application startup.

Please gimme an easy to write code to detect if user's window version is 9x/Me or NT/XP and how can I get user's System Directory as a String variable.

Thank you.
0
Snollygoster
Asked:
Snollygoster
1 Solution
 
bobbit31Commented:
for part 2:

Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer
As String, ByVal nSize As Long) As Long

Private Const MAX_SIZE = 255

   Dim buff As String
   Dim sysdir as String
   Dim rc As Long
   
   buff = Space$(MAX_SIZE)
   rc = GetSystemDirectory(buff, MAX_SIZE)
   sysdir = Left$(buff, rc)
0
 
bobbit31Commented:
0
 
SnollygosterAuthor Commented:
I will check these and reply later.

BTW I am using VB .NET does this code apply there as well?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bobbit31Commented:
it's windows api, so it should
0
 
SnollygosterAuthor Commented:
I will check these and reply later.

BTW I am using VB .NET does this code apply there as well?
0
 
CleanupPingCommented:
Snollygoster:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
bobbit31Commented:
recommendation: points to bobbit31
0
 
DanRollinsCommented:
Moderator, my recommended disposition is:

    Accept bobbit31's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now