Einzelnen Beitrag anzeigen

Benutzerbild von TKC
TKC

Registriert seit: 21. Apr 2004
Ort: Tuningen
367 Beiträge
 
Delphi XE2 Enterprise
 
#29

Re: wie Signatur/Certific. von EXE auslesen (wie sigcheck.ex

  Alt 15. Apr 2005, 13:08
wenn du meinst ... teste es doch mal, dann wirst du feststellen das du ein Speicher Leak bekommst.

Btw ... die Pointer waren nur Beispiele ... aber ich kann dir ja ein Messer schicken .. dann kannst du
damit die Haare spalten

Also be mir ist die laut doku in der wintrust.h ... und zwar so:

Code:
//////////////////////////////////////////////////////////////////////////////
//
// WINTRUST_DATA Structure
//----------------------------------------------------------------------------
//  Used when calling WinVerifyTrust to pass necessary information into
//  the Providers.
//
typedef struct _WINTRUST_DATA
{
    DWORD          cbStruct;                  // = sizeof(WINTRUST_DATA)

    LPVOID         pPolicyCallbackData;       // optional: used to pass data between the app and policy
    LPVOID         pSIPClientData;            // optional: used to pass data between the app and SIP.

    DWORD          dwUIChoice;                // required: UI choice. One of the following.
#                       define     WTD_UI_ALL             1
#                       define     WTD_UI_NONE            2
#                       define     WTD_UI_NOBAD           3
#                       define     WTD_UI_NOGOOD          4

    DWORD          fdwRevocationChecks;       // required: certificate revocation check options
#                       define     WTD_REVOKE_NONE        0x00000000
#                       define     WTD_REVOKE_WHOLECHAIN  0x00000001

    DWORD          dwUnionChoice;             // required: which structure is being passed in?
#                       define     WTD_CHOICE_FILE        1
#                       define     WTD_CHOICE_CATALOG     2
#                       define     WTD_CHOICE_BLOB        3
#                       define     WTD_CHOICE_SIGNER      4
#                       define     WTD_CHOICE_CERT        5
    union
    {
        struct WINTRUST_FILE_INFO_      *pFile;        // individual file
        struct WINTRUST_CATALOG_INFO_   *pCatalog;     // member of a Catalog File
        struct WINTRUST_BLOB_INFO_      *pBlob;        // memory blob
        struct WINTRUST_SGNR_INFO_      *pSgnr;        // signer structure only
        struct WINTRUST_CERT_INFO_      *pCert;
    };

    DWORD          dwStateAction;                     // optional (Catalog File Processing)
#                       define     WTD_STATEACTION_IGNORE          0x00000000
#                       define     WTD_STATEACTION_VERIFY          0x00000001
#                       define     WTD_STATEACTION_CLOSE           0x00000002
#                       define     WTD_STATEACTION_AUTO_CACHE      0x00000003
#                       define     WTD_STATEACTION_AUTO_CACHE_FLUSH 0x00000004

    HANDLE         hWVTStateData;                     // optional (Catalog File Processing)

    WCHAR          *pwszURLReference;         // optional: (future) used to determine zone.
  Mit Zitat antworten Zitat