VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

View Windows XP CD Key

syntax.  (6 Submissions)   Windows System Services   VB Script   Beginner   Wed 3rd February 2021

Function: sGetXPCDKey() will return the CD Key for Windows XP in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.

Inputs
Nothing.

Returns
Your Windows XP CD Key.

API Declarations
Option Explicit
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Private Const REG_BINARY = 3
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const ERROR_SUCCESS = 0&

Rate View Windows XP CD Key (23(23 Vote))
View Windows XP CD Key.bas

View Windows XP CD Key Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters