cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
austin2359
Level 6

-4370 error on RegDBGetKeyValueEx

Alright, I'm trying to use this to find out the version number of a program. I've commented out lines and narrowed to a RegDBGetKeyValueEX command. In other words, if I comment out that line, everything else compiles.

here is my code (with slight modifications to preserve anonymity):
declare variables wrote:

string Value, Key, Item;
number Size;

body in begin/end wrote:

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
Key = "SOFTWARE\\CompanyName\\Product";
Item = "Version";
RegDBGetKeyValueEx(Key, Item, REGDB_STRING, Value, Size);
if Value = "certain_version" then
UninstallApplication("{701F4A06-6D3C-4A69-A962-2938133FCE86}","",LAAW_OPTION_WAIT);
endif;


Why would it throw that -4370 error? The registry key is right, the path is right, and it fails no matter what type of string I make the type.

I looked up the error and it says some sort of "com" error.
Labels (1)
0 Kudos
(2) Replies
austin2359
Level 6

Update: I see it is saying "Numberic variable required." Doesn't make sense to me.
0 Kudos
austin2359
Level 6

Never mind. I think I debugged my way out of this.

The third argument returns a type, instead of selects a type.
0 Kudos