Click here to Skip to main content
Click here to Skip to main content

Check for Windows Genuine in VC++

, 29 Jul 2011
Rate this:
Please Sign up or sign in to vote.
Windows Genuine in Vista & 7
Checking Windows Genuine in Vista and Windows 7 can be done using this code:
#include <slpublic.h>
#pragma comment(lib,"Slwga.lib")
 
bool IsWindowsGenuine()
{
    GUID uid;
    RPC_WSTR rpc=(RPC_WSTR)_T("55c92734-d682-4d71-983e-d6ec3f16059f");
    UuidFromString(rpc,&uid);
    SL_GENUINE_STATE state;
    SLIsGenuineLocal(&uid,&state,NULL);
    if(state==SL_GENUINE_STATE::SL_GEN_STATE_IS_GENUINE)
        return true;
    return false;
}

In this code, use the above GUID only.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author


Comments and Discussions

 
GeneralCurious... what are you building that you'd be interested in... PinmemberAlbert Holguin2-Aug-11 11:50 
Generalinteresting. :) PinmemberGPUToaster1-Aug-11 22:34 
GeneralThank you. PinsubeditorWalt Fair, Jr.30-Jul-11 16:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 29 Jul 2011
Article Copyright 2011 by Sayyed Mostafa Hashemi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid