May 11, 2024, 11:08:50 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Enum registry keys and values

Started by Andy, May 09, 2012, 05:08:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

I have a puzzle, all registry functions work in IWB except:

RegEnumKey and RegEnumValue

The first lists all sub keys of a registry key, the second lists the values stored in a given sub key.

Now, I use the Registry.inc file - the above functions work well in EB - BUT they don't work in IWB?

I had to amend one line in the include file for IWB to even get the programs to compile and thus I cannot use these two functions in IWB.

If you try to use these functions in IWB the programs compile but you get an ap crash with ntdll.dll

Has anyone been able to use these two functions in IWB, if so please let me know it's driving me stupid!

And how should I amend the IWRegistry.inc file if you have.

Thanks,
Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Pretty simple fix!
In your two routines that aren't working you are passing "" as a parameter.
These are the lines:
RegEnumKeyExA(ret,index,retval,ln,NULL,"",ln,ft)
RegEnumValueA(ret,Index,retval,ln,NULL,typ,"",NULL)
I changed them to this and they worked.
string zz=""
RegEnumKeyExA(ret,index,retval,ln,NULL,zz,ln,ft)
RegEnumValueA(ret,Index,retval,ln,NULL,typ,zz,NULL)


I had run into this before.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

Wow that was a simple fix!

It was driving me crazy, thanks for taking the time to have a look!

All working now.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.