Help for this page

Select Code to Download


  1. or download this
    use Win32::API;
    use Win32::API::Struct;
    ...
    Win32::API::Struct->typedef( test => qw(char i; long l;) );
    my $b = Win32::API::Struct->new( 'test' );
    print $b->sizeof;
    
  2. or download this
    (PM)Struct::recognize got 'i', 'char' -> 'c'
    (PM)Struct::recognize got 'l', 'long' -> 'l'
    ...
    (PM)Struct::sizeof first=1 align=4
    (PM)Struct::sizeof returning 8
    8