Einzelnen Beitrag anzeigen

user

Registriert seit: 13. Jul 2010
25 Beiträge
 
Delphi 2 Desktop
 
#9

AW: check this error pls

  Alt 11. Nov 2011, 10:29
I just searched similar function to verify file trust. I got code by Craig Peterson in StackOverflow.

Code:
type
  PWinTrustFileInfo = ^TWinTrustFileInfo;
  TWinTrustFileInfo = record
    cbStruct: DWORD;                   // = sizeof(WINTRUST_FILE_INFO)
    pcwszFilePath: PWideChar;          // required, file name to be verified
    hFile: THandle;                    // optional, open handle to pcwszFilePath
    pgKnownSubject: PGUID;             // optional: fill if the subject type is known
  end;

  PWinTrustData = ^TWinTrustData;
  TWinTrustData = record
    cbStruct: DWORD;
    pPolicyCallbackData: Pointer;
    pSIPClientData: Pointer;
    dwUIChoice: DWORD;
    fdwRevocationChecks: DWORD;
    dwUnionChoice: DWORD;
    pFile: PWinTrustFileInfo;
    dwStateAction: DWORD;
    hWVTStateData: THandle;
    pwszURLReference: PWideChar;
    dwProvFlags: DWORD;
    dwUIContext: DWORD;
  end;
MSDN say

Code:
typedef struct _WINTRUST_DATA {
  DWORD cbStruct;
  LPVOID pPolicyCallbackData;
  LPVOID pSIPClientData;
  DWORD dwUIChoice;
  DWORD fdwRevocationChecks;
  DWORD dwUnionChoice;
  union {
    struct WINTRUST_FILE_INFO_  *pFile;
    struct WINTRUST_CATALOG_INFO_  *pCatalog;
    struct WINTRUST_BLOB_INFO_  *pBlob;
    struct WINTRUST_SGNR_INFO_  *pSgnr;
    struct WINTRUST_CERT_INFO_  *pCert;
  };
  DWORD dwStateAction;
  HANDLE hWVTStateData;
  WCHAR *pwszURLReference;
  DWORD dwProvFlags;
  DWORD dwUIContext;
} WINTRUST_DATA, *PWINTRUST_DATA;
Something like that?

I also get similar function by rllibby and I'll try to compare them.
  Mit Zitat antworten Zitat