sub query_users { my ( $self, $filename ) = @_; my $func = import_api( 'advapi32', 'QueryUsersOnEncryptedFile', 'PP', 'N' ); die "Could not import API QueryUsersOnEncryptedFile: $!" unless defined $func; $filename = make_unicode( File::Spec->canonpath($filename) ); print "filename: $filename\n"; my $encCertHashList = Win32::API::Struct->new( 'ENCRYPTION_CERTIFICATE_HASH_LIST' ); print "retval: " . $func->Call( $filename, $encCertHashList) . "\n"; print $encCertHashList->{nCert_Hash}, "\n"; $encCertHashList = Win32::API::Struct->new( 'ENCRYPTION_CERTIFICATE_HASH_LIST' ); print "retval: " . $func->Call( $filename, \$encCertHashList) . "\n"; print $encCertHashList->{nCert_Hash}, "\n"; $encCertHashList = " " x 1024; print "retval: " . $func->Call( $filename, $encCertHashList) . "\n"; print $encCertHashList, "\n"; $encCertHashList = " " x 1024; print "retval: " . $func->Call( $filename, \$encCertHashList) . "\n"; print $encCertHashList, "\n"; }