|
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 :
ERROR_INVALID_HANDLE
6 (0x6)
The handle is invalid.
so what should i do to remove this error.
thanx in advance.
|
|
|
|
|
Well, what would you expect? Just provide it with a valid handle.
FYI - the doc page[^] contains an example as well.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
B0606115 wrote: so what should i do to remove this error.
I guess... pass a valid handle...?
Can you show how you called RegQueryValueEx?
|
|
|
|
|
HKEY hKey = GetRegistryKey(CString ("Connections") );
this has been successful as i have called RegEnumValue and thats working fine.
but problem is with RegQueryValueEx
int t= RegQueryValueEx( hKey, strValue, NULL, &Type,(LPBYTE)rgValue,&size1);
|
|
|
|
|
Documentation [^] states:
hKey [in]
A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. For more information, see Registry Key Security and Access Rights.
This handle is returned by the RegCreateKeyEx, RegCreateKeyTransacted, RegOpenKeyEx, or RegOpenKeyTransacted function. It can also be one of the following predefined keys:[...]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
B0606115 wrote: so what should i do to remove this error.
You may also choose to shut down the computer and go walking, if there is a sunny day (here is).
(or you may give us more info...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi can somebody Plzz Help me out wid my Project on c++...
Its a Guessing game....
|
|
|
|
|
Please guess yourself and figure it out
|
|
|
|
|
Junior Artist wrote: Hi can somebody Plzz Help me out wid my Project on c++...Confused
Its a Guessing game....
I guess you need to read this [^] .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Junior Artist wrote: Its a Guessing game
It certainly is. Although your actual message is much more elaborate than your subject line...
|
|
|
|
|
Shall i send u my Project details.......
|
|
|
|
|
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)?
|
|
|
|
|
wilburke wrote: But I didn't find a way to dedect if the program uses the LARGEADDRESSAWARE option.
I am not sure whether there is an API for this, but you can find this by checking whether the IMAGE_FILE_HEADER::Characteristics variable contains IMAGE_FILE_LARGE_ADDRESS_AWARE flag.
|
|
|
|
|
Building on Naveen's answer:
Use ImageLoad[^]:
const bool isLargeAddressAware = IMAGE_FILE_LARGE_ADDRESS_AWARE == ((LoadImage()->FileHeader->FileHeader->Characteristics)&IMAGE_FILE_LARGE_ADDRESS_AWARE);
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for your reactions. It's working!
|
|
|
|
|
Hello Friends
I want to know any book or site from where i can learn about how to use c++ in Unix operating system in details.Right now i m working in windows,but now i hv to do some project in UNix.So I want to know to get work in unix,Is any need for different Libraries or anything.
Thanks In advance.
Regards
Yogesh
|
|
|
|
|
Please, let me google that for you [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What exactly do you want to do with Linux?
- Basic OS programming - that's all C, really. I'd recommend Advanced Unix Programming[^]. It may say advanced, but it starts with the basics of Unix programming!
- GUIs - pick a library, any library...I'd go for Qt, because it's a nice framework, is cross-platform etc. There are lots of others available, though
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi friend,Actually i want to go with c++ in Unix .I know basics of unix but i m not aware of creating all Dll that i did in windows.So,what will u suggest?
Thanks
Yogesh
|
|
|
|
|
|
We have creating a Toolbar for IE, there is a Edit box control on toolbar. on IE launch and new tab launch this edit box appears in the toolbar but when we switches tab than it is disappeared, also on clicking location of edit box it appears again.
gud day!!!
Vishnu Gupta
|
|
|
|
|
Hi All,
Ive spent the last 3 days looking for a way to dial a PPPoE connection using c++ (without having to implement the protocols myself). Ive heard that you can use something already in most linux distro's to create them quite easily, but im at a loss when trying to find information about it. Also, dialing it in windows? Is there any way without having to handle the ppp stack and everything yourself?
Any help would be appreciated.
|
|
|
|
|
|
Hello,
I have a menu and the menu Ids are made in the String Table but still the menu items are not activated even when I have not given grayed/inactive in the menu option.
How do I make the menu item active?
Priya
|
|
|
|
|
With MFC, you have to specify a handler for each menu.
MFC disables any menu item with which a handler is not associated.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|