in reply to help with Win32::API (Struct and general)

If nothing else, this will be a nice example for Win32::API, once it works.

Did you check the return value of sizeof? I'm guessing you should pass the name of the structure, instead of the reference.

Please try:

#right after $rasentry = Win32::API::Struct->New( 'RASENTRY' ); # in your code printf "Sizeof \$rasentry: %d, sizeof RASENTRY: %d\n", (Win32::API::Struct::sizeof($rasentry)), (Win32::API::Struct::sizeof('RASENTRY'));
I think you'll get a saner value for 'RASENTRY', but I'm just guessing.
--
Mike

Replies are listed 'Best First'.
Re: Re: help with Win32::API (Struct and general)
by Anonymous Monk on Aug 22, 2003 at 02:44 UTC
    Thanks for the suggestion. Actually, sizeof($rasentry) returns a value of 204, sizeof( 'RASENTRY' ) or sizeof(RASENTRY) return 0. Time for more playing :)
      Blargh!! That was my reply, thought I was logged in, sorry.