How to use Registry functions

M

Marco Roda

I should use NTRegOpenKeyEx to read a registry key.
I got some example like:
<
require 'NT.ph';
use Win32::Registry;

$rc = NTRegOpenKeyEx ( &HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Virtual Roots', &NULL,
&KEY_ALL_ACCESS, $PerlKey );
NTRegQueryValueEx( $PerlKey, '/', &NULL, $type, $HttpRoot );but I have no NT.ph
- where should I found it ?
- how to install ?

Thanks in advance,
Marco
 
A

A. Sinan Unur

I should use NTRegOpenKeyEx to read a registry key.
I got some example like:
<
require 'NT.ph';
use Win32::Registry;

$rc = NTRegOpenKeyEx ( &HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Virtual Roots',
&NULL, &KEY_ALL_ACCESS, $PerlKey );
NTRegQueryValueEx( $PerlKey, '/', &NULL, $type, $HttpRoot );
but I have no NT.ph
- where should I found it ?
- how to install ?

I have no idea.

On the other hand, CPAN is your friend.

http://search.cpan.org/~tyemq/Win32-TieRegistry-0.24/TieRegistry.pm

The documentation shows no mention of NT.ph.

Also, if you had looked, you would have seen:

Win32::Registry - accessing the Windows registry [obsolete, use
Win32::TieRegistry]

Hope this helps.

Sinan
 
M

Marco Roda

Yes, It is so simple and so good,
Thanks,

Marco

A. Sinan Unur said:
I should use NTRegOpenKeyEx to read a registry key.
I got some example like:
<
require 'NT.ph';
use Win32::Registry;

$rc = NTRegOpenKeyEx ( &HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Virtual Roots',
&NULL, &KEY_ALL_ACCESS, $PerlKey );
NTRegQueryValueEx( $PerlKey, '/', &NULL, $type, $HttpRoot );
but I have no NT.ph
- where should I found it ?
- how to install ?

I have no idea.

On the other hand, CPAN is your friend.

http://search.cpan.org/~tyemq/Win32-TieRegistry-0.24/TieRegistry.pm

The documentation shows no mention of NT.ph.

Also, if you had looked, you would have seen:

Win32::Registry - accessing the Windows registry [obsolete, use
Win32::TieRegistry]

Hope this helps.

Sinan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top