I'm testing this on a Windows XP SP3 virtual machine. I connect to it using mstsc from a Windows Vista Ultimate x64 machine (which is also the host for the XP virtual machine). The program running on the RDP host (the XP machine) also opens two other virtual channels in much the same way and they work fine.
I have to read value of the registery so i am using RegQueryValueEx(),but it is returning value 6 which i have seen on msdn means :
The handle is invalid.
so what should i do to remove this error.
On XP / Windows Server you can extend the address space from 2GB to 3GB. Two things are needed:
- you have to use the /3GB option in the boot.ini
- your program should be linked with the LARGEADDRESSAWARE option (could also be set via editbin)
I'm looking for c++ code to find out if both conditions are set.
The first condition can easily checked by looking to ullTotalVirtual from GlobalMemoryStatusEx call.
But I didn't find a way to dedect if the program uses the LARGEADDRESSAWARE option.
MSDN talks about an addressAwarenessType from 'VCLinkerTool Object': http://msdn.microsoft.com/en-us/library/aa712546(VS.71).aspx[^]
How do I use this in a small C++ program (I'm using Visual Studio 2005)?