Re: Power Registry Object
Look:
Code Snippets
Code:
HKEY CurrentRootKey, hWnd;
//...next Snippet...
// This action working properly
ACTION(
/* ID */ 0,
/* Name */ "Set root key to HKEY_CLASSES_ROOT",
/* Flags */ 0,
/* Params */ (0)
) {
CurrentRootKey = HKEY_CLASSES_ROOT;
}
//...next Snippet...
// This action working properly too
ACTION(
/* ID */ 5,
/* Name */ "Open key %0",
/* Flags */ 0,
/* Params */ (1,PARAM_EXPSTRING,"Open key")
) {
result = RegOpenKeyEx(CurrentRootKey, (char *)Param(TYPE_STRING), 0, KEY_ALL_ACCESS, &hWnd);
}
//...next Snippet...
// This action does not return value of CurrentRootKey
EXPRESSION(
/* ID */ 1,
/* Name */ "RegKey$(",
/* Flags */ EXPFLAG_STRING,
/* Params */ (0)
) {
ReturnString(CurrentRootKey); // Return null but messagebox return it correctly.
}
There are no crash.
Btw THANKS for help I am just newbie. :)
Re: Power Registry Object
You didn't have to do this whole project, you know; I would've been happy to modify my Registry++ Object. :grin:
[size:8pt]Although I probably wouldn't have gotten done as quickly as you. ;)[/size]
Re: Power Registry Object
Mhm that's weird. It should crash from my experience: If you want to use expression 1, you will need expression 0 as well. Same goes for action 5. You'll need 0-4 as well:
PHP Code:
ACTION(0, [...]
ACTION(1, [...]
ACTION(2, [...]
ACTION(3, [...]
ACTION(4, [...]
//After you have defined actions 0 to 4, you can use 5 as well
ACTION(
/* ID */ 5,
/* Name */ "Open key %0",
/* Flags */ 0,
/* Params */ (1,PARAM_EXPSTRING,"Open key")
) {
result = RegOpenKeyEx(CurrentRootKey, (char *)Param(TYPE_STRING), 0, KEY_ALL_ACCESS, &hWnd);
}
Re: Power Registry Object
... I'm pretty sure that's why he put "//Next snippet"
I think he's taking just the parts of the code that relate.
Re: Power Registry Object
Oh, right. For one, as I said, you'll have to duplicate the string before returning. MMF will destroy it automatically. The odd thing is that the string is not displayed at all - I can't think of any reason for that to happen.
Re: Power Registry Object
I will check it out, but for the moment I'm doing a break in the programming of my extensions because I want to finish the course of programming in C++. When I do it I will resume and introduce many new features to my extension.
Please be patient...
Re: Power Registry Object
You can dowload beta version from: PowerRegistry.zip
You need to put file in folders data\runtime and extensions.
This is my first extension. :)
Re: Power Registry Object
It isn't showing up in my extension list as far as I can see. :\
Re: Power Registry Object
Try looking in the All objects.
Re: Power Registry Object
I am. What is is called in the list?