f



QueryRegString

How knows,
After installed Windows 7 Ultimade and VO 2.8 SP3 2837 or 2.7b

The registry QueryRegString() or QueryRegInt() functions we use from binas & 
partner  (Antjeļæ½s samples) are not working anymore, we allways getting Null 
Result
Is still ok in Vista and XP

We need to read information out of  HKEY_LOCAL_MASCHINE\SOFTWARE

is anyone out there how knows wy?

Reinhard 


0
Reinhard
11/16/2009 4:52:04 PM
comp.clipper.visual-objects 12618 articles. 0 followers. Post Follow

18 Replies
434 Views

Similar Articles

[PageSpeed] 30

Reinhard

> is anyone out there how knows wy?

IIRC those functions only read from the Computer Associates sub-keys. If 
there's no CA keys in the registry that may cause the problem.

CYA
Steve 


0
Stephen
11/16/2009 10:57:29 PM
hi steve,
that is wrong
i can read from any registry key in XP or Vista but in Windows 7 Ultimade i 
can not read from the section HKEY_LOCAL_MASCHINE it works when i read from 
HKEY_CURRENT_USER this means there is some protection controlled from the 
Operation system

reinhard

"Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> schrieb im Newsbeitrag 
news:tNkMm.55342$ze1.48915@news-server.bigpond.net.au...
> Reinhard
>
>> is anyone out there how knows wy?
>
> IIRC those functions only read from the Computer Associates sub-keys. If 
> there's no CA keys in the registry that may cause the problem.
>
> CYA
> Steve
> 


0
Reinhard
11/17/2009 7:33:07 AM
Reinhard

> that is wrong
I was thinking of the CA functions not the 3rd party ones your using - 
sorry.

> HKEY_LOCAL_MASCHINE
The only other thing is the spelling of MACHINE in the above call
    - probably just a typo in the post though

CYA
Steve 


0
Stephen
11/17/2009 8:14:08 AM
Steve your right this is a  typing failure

but by the way have you information how to access the registry key or how 
you get administrator rights  in the VO program ?

reinhard
"Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> schrieb im Newsbeitrag 
news:kXsMm.55410$ze1.12947@news-server.bigpond.net.au...
> Reinhard
>
>> that is wrong
> I was thinking of the CA functions not the 3rd party ones your using - 
> sorry.
>
>> HKEY_LOCAL_MASCHINE
> The only other thing is the spelling of MACHINE in the above call
>    - probably just a typo in the post though
>
> CYA
> Steve
> 


0
Reinhard
11/17/2009 8:22:21 AM
We use also functions derived from Antje Binas's code and until now we did 
not have problems when installing on Windows 7 - not when reading from local 
machine and not when reading from current user.

Arne Ortlinghaus
ACS Data Systems

"Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
news:hdtmfm$n3s$01$1@news.t-online.com...
> Steve your right this is a  typing failure
>
> but by the way have you information how to access the registry key or how 
> you get administrator rights  in the VO program ?
>
> reinhard
> "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> schrieb im Newsbeitrag 
> news:kXsMm.55410$ze1.12947@news-server.bigpond.net.au...
>> Reinhard
>>
>>> that is wrong
>> I was thinking of the CA functions not the 3rd party ones your using - 
>> sorry.
>>
>>> HKEY_LOCAL_MASCHINE
>> The only other thing is the spelling of MACHINE in the above call
>>    - probably just a typo in the post though
>>
>> CYA
>> Steve
>>
>
> 

0
Arne
11/17/2009 4:24:24 PM
Hallo Arne,
I am using "Windows7 Ultimade" I have not tested an Window7 Professional

It was running an the "Windows7 Ultimade" prerelease Version

Reinhard

"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
news:hduint$bn5$1@news.eternal-september.org...
> We use also functions derived from Antje Binas's code and until now we did 
> not have problems when installing on Windows 7 - not when reading from 
> local machine and not when reading from current user.
>
> Arne Ortlinghaus
> ACS Data Systems
>
> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
> news:hdtmfm$n3s$01$1@news.t-online.com...
>> Steve your right this is a  typing failure
>>
>> but by the way have you information how to access the registry key or how 
>> you get administrator rights  in the VO program ?
>>
>> reinhard
>> "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> schrieb im Newsbeitrag 
>> news:kXsMm.55410$ze1.12947@news-server.bigpond.net.au...
>>> Reinhard
>>>
>>>> that is wrong
>>> I was thinking of the CA functions not the 3rd party ones your using - 
>>> sorry.
>>>
>>>> HKEY_LOCAL_MASCHINE
>>> The only other thing is the spelling of MACHINE in the above call
>>>    - probably just a typo in the post though
>>>
>>> CYA
>>> Steve
>>>
>>
>>
> 


0
Reinhard
11/19/2009 11:24:27 AM
hi Arne,

For your Info:
 I testet this  on "Window7 Professional" and there no Problems.

This means in the Ultimade Version there is some Limit to access the 
registry how I dont know ???

Reinhard
"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
news:hduint$bn5$1@news.eternal-september.org...
> We use also functions derived from Antje Binas's code and until now we did 
> not have problems when installing on Windows 7 - not when reading from 
> local machine and not when reading from current user.
>
> Arne Ortlinghaus
> ACS Data Systems
>
> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
> news:hdtmfm$n3s$01$1@news.t-online.com...
>> Steve your right this is a  typing failure
>>
>> but by the way have you information how to access the registry key or how 
>> you get administrator rights  in the VO program ?
>>
>> reinhard
>> "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> schrieb im Newsbeitrag 
>> news:kXsMm.55410$ze1.12947@news-server.bigpond.net.au...
>>> Reinhard
>>>
>>>> that is wrong
>>> I was thinking of the CA functions not the 3rd party ones your using - 
>>> sorry.
>>>
>>>> HKEY_LOCAL_MASCHINE
>>> The only other thing is the spelling of MACHINE in the above call
>>>    - probably just a typo in the post though
>>>
>>> CYA
>>> Steve
>>>
>>
>>
> 


0
Reinhard
11/19/2009 1:00:30 PM
Reinhard,

Do you have UAC enabled?

-- 

Ginny Caughey
www.wasteworks.com




"Reinhard Frenzel" <support@arrisa.com> wrote in message 
news:he3fh3$vuj$00$1@news.t-online.com...
> hi Arne,
>
> For your Info:
> I testet this  on "Window7 Professional" and there no Problems.
>
> This means in the Ultimade Version there is some Limit to access the 
> registry how I dont know ???
>
> Reinhard
> "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
> news:hduint$bn5$1@news.eternal-september.org...
>> We use also functions derived from Antje Binas's code and until now we 
>> did not have problems when installing on Windows 7 - not when reading 
>> from local machine and not when reading from current user.
>>
>> Arne Ortlinghaus
>> ACS Data Systems
>>
>> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
>> news:hdtmfm$n3s$01$1@news.t-online.com...
>>> Steve your right this is a  typing failure
>>>
>>> but by the way have you information how to access the registry key or 
>>> how you get administrator rights  in the VO program ?
>>>
>>> reinhard
>>> "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> schrieb im Newsbeitrag 
>>> news:kXsMm.55410$ze1.12947@news-server.bigpond.net.au...
>>>> Reinhard
>>>>
>>>>> that is wrong
>>>> I was thinking of the CA functions not the 3rd party ones your using - 
>>>> sorry.
>>>>
>>>>> HKEY_LOCAL_MASCHINE
>>>> The only other thing is the spelling of MACHINE in the above call
>>>>    - probably just a typo in the post though
>>>>
>>>> CYA
>>>> Steve
>>>>
>>>
>>>
>>
>
> 
0
Ginny
11/19/2009 1:41:33 PM
Hi Ginny,

Thanks for this Information  i verifyed  this  it is disabled
and i  login as administrator,

I debuged it and the Prblem is at Line
nRet := RegQueryValueEx(
*************code ********************************
FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) AS 
DWORD PASCAL

LOCAL nRet AS DWORD

LOCAL pSubKey AS PTR

LOCAL nType AS DWORD

LOCAL nValue AS DWORD

LOCAL nSize AS INT

__AdjustNames(@hKey, @cSubKey)

pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)

IF pSubKey != NULL_PTR

        nSize := _SIZEOF(DWORD)

        nType := REG_DWORD

        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
@nType, @nValue, @nSize )

        IF nRet = ERROR_SUCCESS

                IF nType != REG_DWORD

                        nValue := 0

                ENDIF

            ENDIF

            RegCloseKey(pSubKey)

               ENDIF

RETURN nValue

*****************code end*************************************



maby you have a idee

Reinhard


0
Reinhard
11/19/2009 3:40:11 PM
Reinhard,

I haven't use Antje's code nor have I worked with the registry functions in 
the WinAPI so I don't know what I should look for. I have used the .NET 
registry classes so I'm more familiar with that. If you expose the .NET 
registry info you need to get via COM, you could just call the COM-visible 
..NET method from VO. Maybe this is overkill for what you need to do, but 
this approach has saved me time over and over again where a .NET solution to 
a problem was available.

-- 

Ginny Caughey
www.wasteworks.com




"Reinhard Frenzel" <support@arrisa.com> wrote in message 
news:he3osg$51a$03$1@news.t-online.com...
> Hi Ginny,
>
> Thanks for this Information  i verifyed  this  it is disabled
> and i  login as administrator,
>
> I debuged it and the Prblem is at Line
> nRet := RegQueryValueEx(
> *************code ********************************
> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) AS 
> DWORD PASCAL
>
> LOCAL nRet AS DWORD
>
> LOCAL pSubKey AS PTR
>
> LOCAL nType AS DWORD
>
> LOCAL nValue AS DWORD
>
> LOCAL nSize AS INT
>
> __AdjustNames(@hKey, @cSubKey)
>
> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>
> IF pSubKey != NULL_PTR
>
>        nSize := _SIZEOF(DWORD)
>
>        nType := REG_DWORD
>
>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
> @nType, @nValue, @nSize )
>
>        IF nRet = ERROR_SUCCESS
>
>                IF nType != REG_DWORD
>
>                        nValue := 0
>
>                ENDIF
>
>            ENDIF
>
>            RegCloseKey(pSubKey)
>
>               ENDIF
>
> RETURN nValue
>
> *****************code end*************************************
>
>
>
> maby you have a idee
>
> Reinhard
>
> 
0
Ginny
11/19/2009 3:46:53 PM
Hi Ginny,
This sound good,
have you a sample how to use
reinhard

"Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im Newsbeitrag 
news:014de694$0$14964$c3e8da3@news.astraweb.com...
> Reinhard,
>
> I haven't use Antje's code nor have I worked with the registry functions 
> in the WinAPI so I don't know what I should look for. I have used the .NET 
> registry classes so I'm more familiar with that. If you expose the .NET 
> registry info you need to get via COM, you could just call the COM-visible 
> .NET method from VO. Maybe this is overkill for what you need to do, but 
> this approach has saved me time over and over again where a .NET solution 
> to a problem was available.
>
> -- 
>
> Ginny Caughey
> www.wasteworks.com
>
>
>
>
> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
> news:he3osg$51a$03$1@news.t-online.com...
>> Hi Ginny,
>>
>> Thanks for this Information  i verifyed  this  it is disabled
>> and i  login as administrator,
>>
>> I debuged it and the Prblem is at Line
>> nRet := RegQueryValueEx(
>> *************code ********************************
>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) 
>> AS DWORD PASCAL
>>
>> LOCAL nRet AS DWORD
>>
>> LOCAL pSubKey AS PTR
>>
>> LOCAL nType AS DWORD
>>
>> LOCAL nValue AS DWORD
>>
>> LOCAL nSize AS INT
>>
>> __AdjustNames(@hKey, @cSubKey)
>>
>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>
>> IF pSubKey != NULL_PTR
>>
>>        nSize := _SIZEOF(DWORD)
>>
>>        nType := REG_DWORD
>>
>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>> @nType, @nValue, @nSize )
>>
>>        IF nRet = ERROR_SUCCESS
>>
>>                IF nType != REG_DWORD
>>
>>                        nValue := 0
>>
>>                ENDIF
>>
>>            ENDIF
>>
>>            RegCloseKey(pSubKey)
>>
>>               ENDIF
>>
>> RETURN nValue
>>
>> *****************code end*************************************
>>
>>
>>
>> maby you have a idee
>>
>> Reinhard
>>
>> 


0
Reinhard
11/19/2009 4:30:57 PM
Sure. Email me and I'll send you my paper explaining how to use C# from VO. 
Then if you have questions specifically about the Registry classes, we can 
go from there.

Here's some C# code for working with the Registry taken from a sample I did 
at VODC to give you some ideas for reading and writing to registry. (Of 
course the reading and writing parts are in different methods.)

                RegistryKey rk = 
Registry.CurrentUser.CreateSubKey(nameOfKey);
                rk.SetValue("BinaryValue", encryptedData, 
RegistryValueKind.Binary);
                rk.Close();



                RegistryKey rk = Registry.CurrentUser.OpenSubKey(nameOfKey);
                if (rk != null)
                {
                    byte[] encryptedPassword = 
(byte[])rk.GetValue("BinaryValue");
                    rk.Close();
                    // Do something with data from registry
                }


-- 

Ginny Caughey
www.wasteworks.com




"Reinhard Frenzel" <support@arrisa.com> wrote in message 
news:he3rrm$g1k$01$1@news.t-online.com...
> Hi Ginny,
> This sound good,
> have you a sample how to use
> reinhard
>
> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>> Reinhard,
>>
>> I haven't use Antje's code nor have I worked with the registry functions 
>> in the WinAPI so I don't know what I should look for. I have used the 
>> .NET registry classes so I'm more familiar with that. If you expose the 
>> .NET registry info you need to get via COM, you could just call the 
>> COM-visible .NET method from VO. Maybe this is overkill for what you need 
>> to do, but this approach has saved me time over and over again where a 
>> .NET solution to a problem was available.
>>
>> -- 
>>
>> Ginny Caughey
>> www.wasteworks.com
>>
>>
>>
>>
>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>> news:he3osg$51a$03$1@news.t-online.com...
>>> Hi Ginny,
>>>
>>> Thanks for this Information  i verifyed  this  it is disabled
>>> and i  login as administrator,
>>>
>>> I debuged it and the Prblem is at Line
>>> nRet := RegQueryValueEx(
>>> *************code ********************************
>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) 
>>> AS DWORD PASCAL
>>>
>>> LOCAL nRet AS DWORD
>>>
>>> LOCAL pSubKey AS PTR
>>>
>>> LOCAL nType AS DWORD
>>>
>>> LOCAL nValue AS DWORD
>>>
>>> LOCAL nSize AS INT
>>>
>>> __AdjustNames(@hKey, @cSubKey)
>>>
>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>
>>> IF pSubKey != NULL_PTR
>>>
>>>        nSize := _SIZEOF(DWORD)
>>>
>>>        nType := REG_DWORD
>>>
>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>>> @nType, @nValue, @nSize )
>>>
>>>        IF nRet = ERROR_SUCCESS
>>>
>>>                IF nType != REG_DWORD
>>>
>>>                        nValue := 0
>>>
>>>                ENDIF
>>>
>>>            ENDIF
>>>
>>>            RegCloseKey(pSubKey)
>>>
>>>               ENDIF
>>>
>>> RETURN nValue
>>>
>>> *****************code end*************************************
>>>
>>>
>>>
>>> maby you have a idee
>>>
>>> Reinhard
>>>
>>>
>
> 
0
Ginny
11/19/2009 5:42:14 PM
And could it be some user right issues?

Have you tried reading from current user?

Arne

"Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
news:he3rrm$g1k$01$1@news.t-online.com...
> Hi Ginny,
> This sound good,
> have you a sample how to use
> reinhard
>
> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>> Reinhard,
>>
>> I haven't use Antje's code nor have I worked with the registry functions 
>> in the WinAPI so I don't know what I should look for. I have used the 
>> .NET registry classes so I'm more familiar with that. If you expose the 
>> .NET registry info you need to get via COM, you could just call the 
>> COM-visible .NET method from VO. Maybe this is overkill for what you need 
>> to do, but this approach has saved me time over and over again where a 
>> .NET solution to a problem was available.
>>
>> -- 
>>
>> Ginny Caughey
>> www.wasteworks.com
>>
>>
>>
>>
>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>> news:he3osg$51a$03$1@news.t-online.com...
>>> Hi Ginny,
>>>
>>> Thanks for this Information  i verifyed  this  it is disabled
>>> and i  login as administrator,
>>>
>>> I debuged it and the Prblem is at Line
>>> nRet := RegQueryValueEx(
>>> *************code ********************************
>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) 
>>> AS DWORD PASCAL
>>>
>>> LOCAL nRet AS DWORD
>>>
>>> LOCAL pSubKey AS PTR
>>>
>>> LOCAL nType AS DWORD
>>>
>>> LOCAL nValue AS DWORD
>>>
>>> LOCAL nSize AS INT
>>>
>>> __AdjustNames(@hKey, @cSubKey)
>>>
>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>
>>> IF pSubKey != NULL_PTR
>>>
>>>        nSize := _SIZEOF(DWORD)
>>>
>>>        nType := REG_DWORD
>>>
>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>>> @nType, @nValue, @nSize )
>>>
>>>        IF nRet = ERROR_SUCCESS
>>>
>>>                IF nType != REG_DWORD
>>>
>>>                        nValue := 0
>>>
>>>                ENDIF
>>>
>>>            ENDIF
>>>
>>>            RegCloseKey(pSubKey)
>>>
>>>               ENDIF
>>>
>>> RETURN nValue
>>>
>>> *****************code end*************************************
>>>
>>>
>>>
>>> maby you have a idee
>>>
>>> Reinhard
>>>
>>>
>
> 

0
Arne
11/20/2009 7:36:02 AM
Hi Arne,

Yes i tried  from the current user and this works ok
but when i adress the Local Maschine it returns no value

reinhard
"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
news:he5gt4$i1r$1@news.eternal-september.org...
> And could it be some user right issues?
>
> Have you tried reading from current user?
>
> Arne
>
> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
> news:he3rrm$g1k$01$1@news.t-online.com...
>> Hi Ginny,
>> This sound good,
>> have you a sample how to use
>> reinhard
>>
>> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
>> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>>> Reinhard,
>>>
>>> I haven't use Antje's code nor have I worked with the registry functions 
>>> in the WinAPI so I don't know what I should look for. I have used the 
>>> .NET registry classes so I'm more familiar with that. If you expose the 
>>> .NET registry info you need to get via COM, you could just call the 
>>> COM-visible .NET method from VO. Maybe this is overkill for what you 
>>> need to do, but this approach has saved me time over and over again 
>>> where a .NET solution to a problem was available.
>>>
>>> -- 
>>>
>>> Ginny Caughey
>>> www.wasteworks.com
>>>
>>>
>>>
>>>
>>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>>> news:he3osg$51a$03$1@news.t-online.com...
>>>> Hi Ginny,
>>>>
>>>> Thanks for this Information  i verifyed  this  it is disabled
>>>> and i  login as administrator,
>>>>
>>>> I debuged it and the Prblem is at Line
>>>> nRet := RegQueryValueEx(
>>>> *************code ********************************
>>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) 
>>>> AS DWORD PASCAL
>>>>
>>>> LOCAL nRet AS DWORD
>>>>
>>>> LOCAL pSubKey AS PTR
>>>>
>>>> LOCAL nType AS DWORD
>>>>
>>>> LOCAL nValue AS DWORD
>>>>
>>>> LOCAL nSize AS INT
>>>>
>>>> __AdjustNames(@hKey, @cSubKey)
>>>>
>>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>>
>>>> IF pSubKey != NULL_PTR
>>>>
>>>>        nSize := _SIZEOF(DWORD)
>>>>
>>>>        nType := REG_DWORD
>>>>
>>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>>>> @nType, @nValue, @nSize )
>>>>
>>>>        IF nRet = ERROR_SUCCESS
>>>>
>>>>                IF nType != REG_DWORD
>>>>
>>>>                        nValue := 0
>>>>
>>>>                ENDIF
>>>>
>>>>            ENDIF
>>>>
>>>>            RegCloseKey(pSubKey)
>>>>
>>>>               ENDIF
>>>>
>>>> RETURN nValue
>>>>
>>>> *****************code end*************************************
>>>>
>>>>
>>>>
>>>> maby you have a idee
>>>>
>>>> Reinhard
>>>>
>>>>
>>
>>
> 


0
Reinhard
11/20/2009 9:18:53 AM
The .NET works on my machine running Win 7 Pro with UAC, but I haven't tried 
it from Ultimate.

-- 

Ginny Caughey
www.wasteworks.com




"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> wrote in message 
news:he5gt4$i1r$1@news.eternal-september.org...
> And could it be some user right issues?
>
> Have you tried reading from current user?
>
> Arne
>
> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
> news:he3rrm$g1k$01$1@news.t-online.com...
>> Hi Ginny,
>> This sound good,
>> have you a sample how to use
>> reinhard
>>
>> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
>> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>>> Reinhard,
>>>
>>> I haven't use Antje's code nor have I worked with the registry functions 
>>> in the WinAPI so I don't know what I should look for. I have used the 
>>> .NET registry classes so I'm more familiar with that. If you expose the 
>>> .NET registry info you need to get via COM, you could just call the 
>>> COM-visible .NET method from VO. Maybe this is overkill for what you 
>>> need to do, but this approach has saved me time over and over again 
>>> where a .NET solution to a problem was available.
>>>
>>> -- 
>>>
>>> Ginny Caughey
>>> www.wasteworks.com
>>>
>>>
>>>
>>>
>>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>>> news:he3osg$51a$03$1@news.t-online.com...
>>>> Hi Ginny,
>>>>
>>>> Thanks for this Information  i verifyed  this  it is disabled
>>>> and i  login as administrator,
>>>>
>>>> I debuged it and the Prblem is at Line
>>>> nRet := RegQueryValueEx(
>>>> *************code ********************************
>>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS STRING) 
>>>> AS DWORD PASCAL
>>>>
>>>> LOCAL nRet AS DWORD
>>>>
>>>> LOCAL pSubKey AS PTR
>>>>
>>>> LOCAL nType AS DWORD
>>>>
>>>> LOCAL nValue AS DWORD
>>>>
>>>> LOCAL nSize AS INT
>>>>
>>>> __AdjustNames(@hKey, @cSubKey)
>>>>
>>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>>
>>>> IF pSubKey != NULL_PTR
>>>>
>>>>        nSize := _SIZEOF(DWORD)
>>>>
>>>>        nType := REG_DWORD
>>>>
>>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>>>> @nType, @nValue, @nSize )
>>>>
>>>>        IF nRet = ERROR_SUCCESS
>>>>
>>>>                IF nType != REG_DWORD
>>>>
>>>>                        nValue := 0
>>>>
>>>>                ENDIF
>>>>
>>>>            ENDIF
>>>>
>>>>            RegCloseKey(pSubKey)
>>>>
>>>>               ENDIF
>>>>
>>>> RETURN nValue
>>>>
>>>> *****************code end*************************************
>>>>
>>>>
>>>>
>>>> maby you have a idee
>>>>
>>>> Reinhard
>>>>
>>>>
>>
>>
> 
0
Ginny
11/20/2009 10:59:00 AM
If you can read current user then these should be registry right issues and 
in this case no read no write. In each tree part of the registry there can 
be set user right changes which can be seen with regedit right mouse.

Arne

"Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
news:he5mtt$e79$02$1@news.t-online.com...
> Hi Arne,
>
> Yes i tried  from the current user and this works ok
> but when i adress the Local Maschine it returns no value
>
> reinhard
> "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
> news:he5gt4$i1r$1@news.eternal-september.org...
>> And could it be some user right issues?
>>
>> Have you tried reading from current user?
>>
>> Arne
>>
>> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
>> news:he3rrm$g1k$01$1@news.t-online.com...
>>> Hi Ginny,
>>> This sound good,
>>> have you a sample how to use
>>> reinhard
>>>
>>> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
>>> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>>>> Reinhard,
>>>>
>>>> I haven't use Antje's code nor have I worked with the registry 
>>>> functions in the WinAPI so I don't know what I should look for. I have 
>>>> used the .NET registry classes so I'm more familiar with that. If you 
>>>> expose the .NET registry info you need to get via COM, you could just 
>>>> call the COM-visible .NET method from VO. Maybe this is overkill for 
>>>> what you need to do, but this approach has saved me time over and over 
>>>> again where a .NET solution to a problem was available.
>>>>
>>>> -- 
>>>>
>>>> Ginny Caughey
>>>> www.wasteworks.com
>>>>
>>>>
>>>>
>>>>
>>>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>>>> news:he3osg$51a$03$1@news.t-online.com...
>>>>> Hi Ginny,
>>>>>
>>>>> Thanks for this Information  i verifyed  this  it is disabled
>>>>> and i  login as administrator,
>>>>>
>>>>> I debuged it and the Prblem is at Line
>>>>> nRet := RegQueryValueEx(
>>>>> *************code ********************************
>>>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS 
>>>>> STRING) AS DWORD PASCAL
>>>>>
>>>>> LOCAL nRet AS DWORD
>>>>>
>>>>> LOCAL pSubKey AS PTR
>>>>>
>>>>> LOCAL nType AS DWORD
>>>>>
>>>>> LOCAL nValue AS DWORD
>>>>>
>>>>> LOCAL nSize AS INT
>>>>>
>>>>> __AdjustNames(@hKey, @cSubKey)
>>>>>
>>>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>>>
>>>>> IF pSubKey != NULL_PTR
>>>>>
>>>>>        nSize := _SIZEOF(DWORD)
>>>>>
>>>>>        nType := REG_DWORD
>>>>>
>>>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>>>>> @nType, @nValue, @nSize )
>>>>>
>>>>>        IF nRet = ERROR_SUCCESS
>>>>>
>>>>>                IF nType != REG_DWORD
>>>>>
>>>>>                        nValue := 0
>>>>>
>>>>>                ENDIF
>>>>>
>>>>>            ENDIF
>>>>>
>>>>>            RegCloseKey(pSubKey)
>>>>>
>>>>>               ENDIF
>>>>>
>>>>> RETURN nValue
>>>>>
>>>>> *****************code end*************************************
>>>>>
>>>>>
>>>>>
>>>>> maby you have a idee
>>>>>
>>>>> Reinhard
>>>>>
>>>>>
>>>
>>>
>>
>
> 

0
Arne
11/20/2009 5:24:57 PM
Good morning Arne,
Thanks for this Information.
I set all rights to full (read/write) access but the same result (no return 
Value)?
Is there a way to control the userrights from the registry with VO !

regards reinhard


"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
news:he6jd9$7om$1@news.eternal-september.org...
> If you can read current user then these should be registry right issues 
> and in this case no read no write. In each tree part of the registry there 
> can be set user right changes which can be seen with regedit right mouse.
>
> Arne
>
> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
> news:he5mtt$e79$02$1@news.t-online.com...
>> Hi Arne,
>>
>> Yes i tried  from the current user and this works ok
>> but when i adress the Local Maschine it returns no value
>>
>> reinhard
>> "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
>> news:he5gt4$i1r$1@news.eternal-september.org...
>>> And could it be some user right issues?
>>>
>>> Have you tried reading from current user?
>>>
>>> Arne
>>>
>>> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
>>> news:he3rrm$g1k$01$1@news.t-online.com...
>>>> Hi Ginny,
>>>> This sound good,
>>>> have you a sample how to use
>>>> reinhard
>>>>
>>>> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
>>>> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>>>>> Reinhard,
>>>>>
>>>>> I haven't use Antje's code nor have I worked with the registry 
>>>>> functions in the WinAPI so I don't know what I should look for. I have 
>>>>> used the .NET registry classes so I'm more familiar with that. If you 
>>>>> expose the .NET registry info you need to get via COM, you could just 
>>>>> call the COM-visible .NET method from VO. Maybe this is overkill for 
>>>>> what you need to do, but this approach has saved me time over and over 
>>>>> again where a .NET solution to a problem was available.
>>>>>
>>>>> -- 
>>>>>
>>>>> Ginny Caughey
>>>>> www.wasteworks.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>>>>> news:he3osg$51a$03$1@news.t-online.com...
>>>>>> Hi Ginny,
>>>>>>
>>>>>> Thanks for this Information  i verifyed  this  it is disabled
>>>>>> and i  login as administrator,
>>>>>>
>>>>>> I debuged it and the Prblem is at Line
>>>>>> nRet := RegQueryValueEx(
>>>>>> *************code ********************************
>>>>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS 
>>>>>> STRING) AS DWORD PASCAL
>>>>>>
>>>>>> LOCAL nRet AS DWORD
>>>>>>
>>>>>> LOCAL pSubKey AS PTR
>>>>>>
>>>>>> LOCAL nType AS DWORD
>>>>>>
>>>>>> LOCAL nValue AS DWORD
>>>>>>
>>>>>> LOCAL nSize AS INT
>>>>>>
>>>>>> __AdjustNames(@hKey, @cSubKey)
>>>>>>
>>>>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>>>>
>>>>>> IF pSubKey != NULL_PTR
>>>>>>
>>>>>>        nSize := _SIZEOF(DWORD)
>>>>>>
>>>>>>        nType := REG_DWORD
>>>>>>
>>>>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName),  0, 
>>>>>> @nType, @nValue, @nSize )
>>>>>>
>>>>>>        IF nRet = ERROR_SUCCESS
>>>>>>
>>>>>>                IF nType != REG_DWORD
>>>>>>
>>>>>>                        nValue := 0
>>>>>>
>>>>>>                ENDIF
>>>>>>
>>>>>>            ENDIF
>>>>>>
>>>>>>            RegCloseKey(pSubKey)
>>>>>>
>>>>>>               ENDIF
>>>>>>
>>>>>> RETURN nValue
>>>>>>
>>>>>> *****************code end*************************************
>>>>>>
>>>>>>
>>>>>>
>>>>>> maby you have a idee
>>>>>>
>>>>>> Reinhard
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>
>>
> 


0
Reinhard
11/23/2009 9:00:58 AM
Hi Reinhard,

I am not so familiar with the rights possibilities. I think the first thing 
is a test program with which you can execute queries against different trees 
of the registry without having to compile something to be able to explore 
the registry. A good utility for verifying the registry calls is also the 
process explorer from sysinternals.com. So you can directly verify what is 
asking your program for and what is answering the system.

I remember also a strange case on my Vista PC where I installed a program 
(Crystal Reports) without UAC and then afterwards I could not modify certain 
registry entries under UAC running as administrator with my program. I had 
to do it with regedit.

Arne Ortlinghaus


"Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
news:hedj03$ilt$02$1@news.t-online.com...
> Good morning Arne,
> Thanks for this Information.
> I set all rights to full (read/write) access but the same result (no 
> return Value)?
> Is there a way to control the userrights from the registry with VO !
>
> regards reinhard
>
>
> "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
> news:he6jd9$7om$1@news.eternal-september.org...
>> If you can read current user then these should be registry right issues 
>> and in this case no read no write. In each tree part of the registry 
>> there can be set user right changes which can be seen with regedit right 
>> mouse.
>>
>> Arne
>>
>> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
>> news:he5mtt$e79$02$1@news.t-online.com...
>>> Hi Arne,
>>>
>>> Yes i tried  from the current user and this works ok
>>> but when i adress the Local Maschine it returns no value
>>>
>>> reinhard
>>> "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> schrieb im Newsbeitrag 
>>> news:he5gt4$i1r$1@news.eternal-september.org...
>>>> And could it be some user right issues?
>>>>
>>>> Have you tried reading from current user?
>>>>
>>>> Arne
>>>>
>>>> "Reinhard Frenzel" <support@arrisa.com> schrieb im Newsbeitrag 
>>>> news:he3rrm$g1k$01$1@news.t-online.com...
>>>>> Hi Ginny,
>>>>> This sound good,
>>>>> have you a sample how to use
>>>>> reinhard
>>>>>
>>>>> "Ginny Caughey" <ginny.caughey.online@wasteworks.com> schrieb im 
>>>>> Newsbeitrag news:014de694$0$14964$c3e8da3@news.astraweb.com...
>>>>>> Reinhard,
>>>>>>
>>>>>> I haven't use Antje's code nor have I worked with the registry 
>>>>>> functions in the WinAPI so I don't know what I should look for. I 
>>>>>> have used the .NET registry classes so I'm more familiar with that. 
>>>>>> If you expose the .NET registry info you need to get via COM, you 
>>>>>> could just call the COM-visible .NET method from VO. Maybe this is 
>>>>>> overkill for what you need to do, but this approach has saved me time 
>>>>>> over and over again where a .NET solution to a problem was available.
>>>>>>
>>>>>> -- 
>>>>>>
>>>>>> Ginny Caughey
>>>>>> www.wasteworks.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Reinhard Frenzel" <support@arrisa.com> wrote in message 
>>>>>> news:he3osg$51a$03$1@news.t-online.com...
>>>>>>> Hi Ginny,
>>>>>>>
>>>>>>> Thanks for this Information  i verifyed  this  it is disabled
>>>>>>> and i  login as administrator,
>>>>>>>
>>>>>>> I debuged it and the Prblem is at Line
>>>>>>> nRet := RegQueryValueEx(
>>>>>>> *************code ********************************
>>>>>>> FUNC QueryRegInt (hKey AS PTR, cSubKey AS STRING, cValueName AS 
>>>>>>> STRING) AS DWORD PASCAL
>>>>>>>
>>>>>>> LOCAL nRet AS DWORD
>>>>>>>
>>>>>>> LOCAL pSubKey AS PTR
>>>>>>>
>>>>>>> LOCAL nType AS DWORD
>>>>>>>
>>>>>>> LOCAL nValue AS DWORD
>>>>>>>
>>>>>>> LOCAL nSize AS INT
>>>>>>>
>>>>>>> __AdjustNames(@hKey, @cSubKey)
>>>>>>>
>>>>>>> pSubKey := __OpenQueryKey( hKey, cSubKey, KEY_QUERY_VALUE)
>>>>>>>
>>>>>>> IF pSubKey != NULL_PTR
>>>>>>>
>>>>>>>        nSize := _SIZEOF(DWORD)
>>>>>>>
>>>>>>>        nType := REG_DWORD
>>>>>>>
>>>>>>>        nRet := RegQueryValueEx( pSubKey,  String2Psz(cValueName), 
>>>>>>> 0, @nType, @nValue, @nSize )
>>>>>>>
>>>>>>>        IF nRet = ERROR_SUCCESS
>>>>>>>
>>>>>>>                IF nType != REG_DWORD
>>>>>>>
>>>>>>>                        nValue := 0
>>>>>>>
>>>>>>>                ENDIF
>>>>>>>
>>>>>>>            ENDIF
>>>>>>>
>>>>>>>            RegCloseKey(pSubKey)
>>>>>>>
>>>>>>>               ENDIF
>>>>>>>
>>>>>>> RETURN nValue
>>>>>>>
>>>>>>> *****************code end*************************************
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> maby you have a idee
>>>>>>>
>>>>>>> Reinhard
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
> 

0
Arne
11/24/2009 8:45:42 AM
Reply: