Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Enumerate Win32 Fonts

by Marza (Vicar)
on Jan 22, 2008 at 07:04 UTC ( #663514=note: print w/replies, xml ) Need Help??

in reply to Enumerate Win32 Fonts

Are you running activestate? I found an old note about a bug. It's old so they either never solved it or it was re-introduced.

Bug Reported.

I ran your code and the code mentioned in the link with strawberry perl. When I ran it with Activestate, both blew up with the mentioned error.

Replies are listed 'Best First'.
Re^2: Enumerate Win32 Fonts
by slloyd (Hermit) on Jan 22, 2008 at 15:47 UTC
    I am running ActiveState
    This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 50 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 820 [274739] provided by ActiveState http://www.ActiveSta Built Jan 23 2007 15:57:46

    Need a good Perl friendly Host Provider?

Re^2: Enumerate Win32 Fonts
by slloyd (Hermit) on Jan 24, 2008 at 00:00 UTC
    I finally ended up having to go to Win32API::Registry to make this work.
    use strict; $|=1; use Win32API::Registry qw( :ALL ); my ($key, $uIndex, $name, $nameLength, $type, $data, $dataLength ); my $ok=RegOpenKeyEx( HKEY_LOCAL_MACHINE , "SOFTWARE\\Microsoft\\Window +s NT\\CurrentVersion\\Fonts", 0, KEY_READ, $key ); if($key){ my $uIndex=0; do{ RegEnumValue ( $key, $uIndex, $name, $nameLength, [], $type, +$data, $dataLength ); print "$name=$data\r\n"; $uIndex++; } while(!regLastError()); } RegCloseKey( $key );

    Need a good Perl friendly Host Provider?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://663514]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2021-01-25 08:52 GMT
Find Nodes?
    Voting Booth?