Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

StdRegProv return codes, What does 2 mean?

127 views
Skip to first unread message

Phil

unread,
Feb 20, 2002, 2:10:34 PM2/20/02
to
I am using the stdregprov and I keep getting a return code of 2?

Does anyone know what that means? Does anyone have a reference location for
other (all) return codes?

Thanks in advance
Phil


Michael Harris (MVP)

unread,
Feb 20, 2002, 7:37:13 PM2/20/02
to
From personal observation...

RC = 0 for success
RC = 1 for key read with no default value
RC = 2 for key not found
RC = 6 for invalid hive

There really isn't any "offical" documentation of the possible RC values, other than the docs saying "... 0 means it worked otherwise it didn't ..."


--
Michael Harris
Microsoft.MVP.Scripting
--
"Phil" <poff...@hotmail.com> wrote in message news:eVvPWIkuBHA.2280@tkmsftngp05...

Michael Harris (MVP)

unread,
Feb 20, 2002, 8:00:35 PM2/20/02
to
RC = 0 for success
RC = 1 for key read but default unnamed value or named value not found

RC = 2 for key not found
RC = 6 for invalid hive

So RC = 1 means the *key* exists but there is no default value set (if you called a GetXxxxValue method without a value name argument) or the named value you were looking for doesn't exist.

I haven't tried to create any deliberate SetXxxxValue errors. The trick to figuring out the StdRegProv method error codes is to make deliberate (but known) errors and see what RC you get.

--
Michael Harris
Microsoft.MVP.Scripting
--

"Michael Harris (MVP)" <mik...@mvps.org> wrote in message news:e$13u$muBHA.2052@tkmsftngp03...

Phil

unread,
Feb 21, 2002, 9:01:13 AM2/21/02
to
I'm still tring to get a 0.

:)

Phil

"Michael Harris (MVP)" <mik...@mvps.org> wrote in message

news:#0$xyMnuBHA.1776@tkmsftngp03...

Michael Harris

unread,
Feb 21, 2002, 10:01:11 AM2/21/02
to
How about posting your code?

I can't tell what's wrong with what I can't see ;-)...

--
Michael Harris
Microsoft.MVP.Scripting
--

"Phil" <poff...@hotmail.com> wrote in message news:#3j#KAuuBHA.2632@tkmsftngp07...

0 new messages