Results 1 to 10 of 10
  1. #1
    Faith's Avatar
    Join Date
    Jul 2008
    Gender
    male
    Posts
    189
    Reputation
    28
    Thanks
    1,791

    [Snippet] Detecting Operating System. [Also C++ Lessons?]

    Had a bit of trouble finding this out for myself simply because Ive never done it before. But MSDN was more than helpful. This is my easier to understand version I guess and I hope it helps some of y'all out. As you know it was on one of my injectors and I got a few PMs asking how I did it so here it is.

    Code:
        
    //Operating System Detection
        OSVERSIONINFO OS;
        ZeroMemory(&OS, sizeof(OSVERSIONINFO));
        OS.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
        GetVersionEx(&OS);
    
        if (OS.dwMajorVersion == 6 && OS.dwMinorVersion == 1) {
        Log->Lines->Add(”Windows 7 Detected”);
        }
        if (OS.dwMajorVersion == 6 && OS.dwMinorVersion == 0) {
        Log->Lines->Add(”Windows Vista Detected”);
        }
        if (OS.dwMajorVersion == 5) {
        Log->Lines->Add(”Windows XP Detected”);
        }
    Also, if you wanted to get the name of the current user logged on:

    //Get Computer Information
    Code:
    TCHAR sUserName[UNLEN + 1];
    TCHAR sCompName[MAX_COMPUTERNAME_LENGTH + 1];
    DWORD dwUserName = sizeof(sUserName);
    DWORD dwCompName = sizeof(sCompName);
    GetUserName(sUserName, &dwUserName);
    GetComputerName(sCompName, &dwCompName);

    How many of you guys would be interested in starting a set of classes geared towards teaching the average users the basics of C++? I was thinking bout hosting sessions
    Last edited by Faith; 10-20-2009 at 05:51 PM.
    Check FaithDEV for my latest applications.
    //Given permission by Dave to post a link to my blog.

  2. #2
    Luke420's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    The Computer :/
    Posts
    6,768
    Reputation
    674
    Thanks
    982
    My Mood
    Cold
    coool :P Faith told me to comment o i did XD

  3. #3
    Fatality319's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    Connecticut
    Posts
    2
    Reputation
    10
    Thanks
    1
    My Mood
    Cynical
    I want the classes!

  4. The Following User Says Thank You to Fatality319 For This Useful Post:

    minyman123 (01-03-2013)

  5. #4
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by xFaith View Post

    How many of you guys would be interested in starting a set of classes geared towards teaching the average users the basics of C++? I was thinking bout hosting sessions
    Ummmm... there's plenty of resources out there. Hell someguy made a hundred video tutorials, but if you want to go for it. I am always a proponent of raising public awareness.

    Oh and almost forgot. Thanks for the tip. I will remember this, I might have to use it someday.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  6. #5
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy
    Reading the registry for the OS is cool too. Buh I guess I won't be using this code any time soon because I'm a VB.Net(er).
    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

  7. #6
    Faith's Avatar
    Join Date
    Jul 2008
    Gender
    male
    Posts
    189
    Reputation
    28
    Thanks
    1,791
    I guess your right, but I kind of need something to do to keep me occupied. Plus live help is better than a video that wont help you with the specific problems you may have.
    Check FaithDEV for my latest applications.
    //Given permission by Dave to post a link to my blog.

  8. #7
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    sure that sounds fun =).

  9. #8
    Matrix_NEO006's Avatar
    Join Date
    Feb 2008
    Gender
    male
    Posts
    240
    Reputation
    12
    Thanks
    33
    My Mood
    Lonely

    How many of you guys would be interested in starting a set of classes geared towards teaching the average users the basics of C++? I was thinking bout hosting sessions


    hmm im interested
    Last edited by Matrix_NEO006; 10-20-2009 at 09:43 PM.

  10. #9
    origami7795's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Illegal Alien's Next Door Neighbor
    Posts
    202
    Reputation
    10
    Thanks
    7
    My Mood
    Busy
    im interested, good idea!
    [YOUTUBE]<object width="560" height="340"><param name="movie" value="https://www.youtube.com/v/MVchQI1cKwM&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/MVchQI1cKwM&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>[/YOUTUBE]

  11. #10
    That0n3Guy's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    1,137
    Reputation
    13
    Thanks
    271
    My Mood
    Sleepy
    I want classes
    Quotes Hall of Fame

    Quote Originally Posted by martijno0o0 View Post
    ok, i got visual basic 2008 and i got some expirients but i need c++ to make hacks rigth?
    so i need c++ and my question is!?¿? where i dontload it? and is c++ a own program or a update for vb08?
    [IMG]https://i660.photobucke*****m/albums/uu327/EddieTheWin/duff.png[/IMG]

Similar Threads

  1. VMware Operating System Not Found
    By squad-E in forum CrossFire Discussions
    Replies: 17
    Last Post: 05-09-2010, 06:32 AM
  2. Replies: 12
    Last Post: 09-27-2009, 08:45 PM
  3. What operating system do you use?
    By brucevduyn in forum General
    Replies: 5
    Last Post: 06-04-2009, 02:18 PM
  4. Best operating system for a new hacker
    By hooter222 in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 06-01-2009, 06:39 PM
  5. [Request/Help] OPERATING SYSTEM
    By apezwijn in forum General
    Replies: 12
    Last Post: 09-17-2008, 12:09 PM

Tags for this Thread