my $func = import_api_ex( 'advapi32', 'DWORD QueryUsersOnEncryptedFile(LPCWSTR lpFileName, LPVOID pUsers)' ) ; # LPVOID* is not known die "Could not import API QueryUsersOnEncryptedFile: $!" unless defined $func; my $encCertHashList = Win32::API::Struct->new('ENCRYPTION_CERTIFICATE_HASH_LIST'); $func->Call( make_unicode( File::Spec->canonpath($filename) ), $encCertHashList ); print $encCertHashList-> {nCert_Hash}; # i get: Can't use string ("ÈÖƒ?") as a HASH ref while "strict refs" in use $encCertHashList = Win32::API::Struct->new('ENCRYPTION_CERTIFICATE_HASH_LIST'); $func->Call( make_unicode( File::Spec->canonpath($filename) ), \$encCertHashList ); print $encCertHashList-> {nCert_Hash}; # i get: Use of uninitialized value in print