my $DataOut; my $pDataOut = pack('LL', 0, 0); #### DPAPI_IMP BOOL CryptUnprotectData( [in] DATA_BLOB *pDataIn, [out, optional] LPWSTR *ppszDataDescr, [in, optional] DATA_BLOB *pOptionalEntropy, PVOID pvReserved, [in, optional] CRYPTPROTECT_PROMPTSTRUCT *pPromptStruct, [in] DWORD dwFlags, [out] DATA_BLOB *pDataOut ); typedef struct _CRYPTOAPI_BLOB { DWORD cbData; BYTE *pbData; } ... #### [out] pDataOut A pointer to a DATA_BLOB structure that receives the encrypted data. When you have finished using the DATA_BLOB structure, free its pbData member by calling the LocalFree function.