Rediger

Del via


VTableProvStruc structure

The VTableProvStruc structure contains pointers to callback functions that can be used by cryptographic service provider (CSP) functions.

Syntax

typedef struct VTableProvStruc {
  DWORD   Version;
  FARPROC FuncVerifyImage;
  FARPROC FuncReturnhWnd;
  DWORD   dwProvType;
  BYTE    *pbContextInfo;
  DWORD   cbContextInfo;
  LPSTR   pszProvName;
} VTableProvStruc, *PVTableProvStruc;

Members

Version

A DWORD value that indicates the version of the structure. Three versions of this structure are used. The versions are number 1, 2, and 3, and determine which members of the structure are valid. Version 1 members are valid on all systems that support this structure.

This is a version 1 member.

FuncVerifyImage

The address of a FuncVerifyImage callback function that the CSP uses to verify the signature of any DLLs that the CSP will load. All auxiliary DLLs into which a CSP makes function calls must be signed in the same manner (and with the same key) as the primary CSP DLL. To ensure this signature, the auxiliary DLLs must be loaded dynamically by using the LoadLibrary function. But before the DLL is loaded, the signature of the DLL must be verified. The CSP performs this verification by calling the FuncVerifyImage function, as shown in the example below.

This function pointer can be stored and used until the CSP context is released.

This is a version 1 member.

FuncReturnhWnd

The address of a FuncReturnhWnd callback function that returns the window handle that the CSP should use as the parent or owner of any user interface that is displayed. CSPs that do not communicate directly with the user and CSPs that use dedicated hardware for this purpose can ignore this entry. This window handle is zero by default, but an application can set this to a different value by using the CryptSetProvParam function to set the PP_CLIENT_HWND property.

This function pointer can be stored and used until the CSP context is released.

This is a version 1 member.

dwProvType

A DWORD value that specifies the type of provider to acquire. The following provider types are predefined and are discussed in detail in CSP Interoperability:

  • PROV_RSA_FULL
  • PROV_RSA_SIG
  • PROV_DSS
  • PROV_FORTEZZA
  • PROV_MS_EXCHANGE

This is a version 2 member.

pbContextInfo

A pointer to an array of context information. The pbContextInfo and cbContextInfo members together determine the information set used when a CPSetProvParam function is called with PP_CONTEXT_INFO set.

This is a version 2 member.

cbContextInfo

A DWORD value that indicates the number of elements in the pbContextInfo array.

This is a version 2 member.

pszProvName

A string that contains the name of the provider.

This is a version 3 member.

Remarks

The pointers in the VTableProvStruc structure are only available within the CPAcquireContext function. If members of the structure are needed after a call to CPAcquireContext is completed, copies of the needed structure elements must be made by the CSP. The function pointers in this structure can be stored and used until the CSP context is released.

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Cspdk.h
Unicode and ANSI names
VTableProvStrucW (Unicode)