Posted By: Bass | Oct 3rd @ 7:53 PM
page 2 of 2
Comments: 48 | Views: 1419
CannotResolveSymbol
CannotResolveSymbol
{insert caption here}

I suppose we could settle which OS is actually installed once and for all...

 

Create an empty C++ project (configured as a console app) in Visual Studio.  Add a main.cpp like so:

 

#include <iostream>

using namespace std;

int main(int argc, char** argv) {
    int a = 1;
    cout << "Size of pointer: " << sizeof(&a) << endl << flush;
    cin >> a;
}

 

Set the target platform to X64 (open the configuration manager, create a new target and select x64 from the list), build and run.

 

If you're on 64-bit, this will run and should output 8.  If it crashes, you're running 32-bit; if it runs and outputs 4, you've built it incorrectly (it's a 32-bit executable).

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

The fact that it shows "Installed memory (RAM): 4.0 GB (3.5 GB usable)" tells me you're running a 32-bit kernel.

Not necessarily. Depending on your motherboard, that can still happen even with a 64 bit OS.

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

There's an easier way (which doesn't depend on having the 64 bit C++ compiler installed, which iirc VS doesn't install by default even on x64):

 

using System;

namespace PointerSizeTest
{
    static class Program
    {
        static void Main()
        {
            Console.WriteLine("You are running a {0} bit operating system.", IntPtr.Size * 8);
        }
    }
}

 

.Net applications compiled with CPU target AnyCPU (which is the default) will run as 32 bit on a 32 bit OS, and as 64 bit on a 64 bit OS. Therefore, this will give you the correct answer.

CannotResolveSymbol
CannotResolveSymbol
{insert caption here}

So it would.  I posted a C++ example as I do my daily work in C++...  yours is probably a little easier, especially if you don't have the x64 tools installed.

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

In C++ I'd do this:

 

#define WIN32_MEAN_AND_LEAN
#include <windows.h>
#include <iostream>
using namespace std;

int main()
{
    SYSTEM_INFO info;
    GetNativeSystemInfo(&info);

    cout << "You are running Windows with a ";
    switch( info.wProcessorArchitecture )
    {
    case PROCESSOR_ARCHITECTURE_INTEL:
        cout << "x86";
        break;
    case PROCESSOR_ARCHITECTURE_AMD64:
        cout << "x64";
        break;
    case PROCESSOR_ARCHITECTURE_IA64:
        cout << "Itanium";
        break;
    default:
        cout << "unknown";
        break;
    }

    cout << " processor architecture." << endl;

    return 0;
}

 

Which, because it uses GetNativeSystemInfo, will give you the correct answer even if you compile it as a 32 bit executable. Smiley

CannotResolveSymbol
CannotResolveSymbol
{insert caption here}

Will that report x86 on a 64-bit processor running 32-bit Windows?

 

(I suppose I should qualify my statement above a little further...  I do most of my work in C++ on Linux; I'm not particularly familiar with native Win32, although I'd like to find the time to learn it.)

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

Will that report x86 on a 64-bit processor running 32-bit Windows?

Yes, it reports the architecture used by Windows, not that of the CPU itself (if they are different).

CannotResolveSymbol
CannotResolveSymbol
{insert caption here}

Depends on the license type.  OEM is one install per license (can't be moved); retail can be transferred (but will require a call to MS to pass activation).

 

For either license type, you can't have it installed in a VM and a physical machine at the same time.

CannotResolveSymbol
CannotResolveSymbol
{insert caption here}

What EULA is included on the disc (or with the disc?)?  It should answer your question.

 

Odds are, it's a retail license, but double-check the EULA.

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

No, it shouldn't fail. I think you get a few hardware changes for free before Internet activation starts failing, and even then only if you do it too frequently I believe. But even if it fails, you just call them, tell them you're transferring the license to another PC, and they should activate it for you. Takes five minutes at most.

Microsoft's activation phoneline even works at crazy times of the day/week. A few years ago I was fighting with the RAID controller on my machine and after enabling/disabling it too many times Windows decided the hardware had changed too much and told me to call the activation line.

 

This was late at night at the weekend. 10pm or 1am or something like that... I began to worry that I'd have to wait until Monday business hours to sort things out but, nope, someone answered straight away, asked a few simple questions and then gave me a number to type in. Everything was back to normal within a few minutes. I was relieved & impressed.

 

I've never really understood the complaints about activation in Windows and stuff like WGA. It's unlikely to cause problems and in the rare cases that it does you just have to phone someone up and it's sorted out immediately. Given the amount of piracy targeting MS's software it doesn't seem like an unreasonable system to me.

 

(I guess it could be a pain for people who test a lot of hardware.)

 

Dodo
Dodo
I'm your creativity creator™ :)

LeoDavidson said:
I guess it could be a pain for people who test a lot of hardware.
Nope, there's special corporate licensing that allows unlimited hardware changes, or the testers reinstall Windows that often, so that activating Windows doesn't make sense in the first place.

Generally, no. It is permitted for the higher end versions, Enterprise and Ultimate (possibly also Business, though I forget).

CannotResolveSymbol
CannotResolveSymbol
{insert caption here}

Uh, what?  An official pressed CD or just one burned by someone?

 

Anyone on C9 have your address?  I suppose it's been long enough since this thread was started...

Spooky!

 

*cough*sendmewindowshomeserver*cough*

blowdart
blowdart
Peek-a-boo

Think bigger.

 

*concentrate* Send me Laura Foy *concentrate*

Bas
Bas
It finds lightbulbs.

*concentrate*sendmethisclippysuit*concentrate*

I would buy that. Although I've always addressed him as Mr. Clip, as we're not close friends.

page 2 of 2
Comments: 48 | Views: 1419
Microsoft Communities