Export (0) Print
Expand All
Expand Minimize


Windows Mobile 6.5
A version of this page is also available for

This structure contains pointers to callback functions that can be used by CSP functions.

typedef struct _VTableProvStruc {
  DWORD Version; 
  FARPROC FuncVerifyImage; 
  FARPROC FuncReturnhWnd; 
  DWORD dwProvType; 
  BYTE* pbContextInfo; 
  DWORD cbContextInfo; 
  LPWSTR pszProvName;
} VTableProvStruc, *PVTableProvStruc;
BOOL FuncVerifyImage(LPCSTR lpszImage, BYTE *pSigData);
BOOL FuncReturnhWnd(DWORD *phWnd);


DWORD value indicating the version of the structure. For Windows Embedded CE, the value is 3.


Pointer to a callback function to verify a signature. See the Remarks section for details.


Pointer to a callback function that returns information on a window handle to use when interacting directly with the user using Microsoft® Win32®. 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 some applications will set it to a different value by using the CryptSetProvParam function.


DWORD value that specifies the type of provider to acquire. The following provider types are predefined:


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.


DWORD value indicating the number of elements in the pbContextInfo array.


String containing the name of the provider.

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 the structure can be copied and the function pointer can be used until the context is freed.

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 make this work properly, the auxiliary DLLs must be loaded dynamically, using the LoadLibrary function. But before Load

Library is called, the signature of the DLL must be verified. The CSP does this verification by calling the FuncVerifyImage function, as illustrated in the following code fragment.

BOOL (FARPROC *ProvVerifyImage)(LPCSTR lpszImage, BYTE *pSigData);
BYTE bSignature[72];
// "ProvVerifyImage" has been set to "pVTable->FuncVerifyImage"
// within the CPAcquireContext function.
// Load the C:\Winnt40\System32\signature.sig file into the 
// bSignature buffer. During development, this file is created 
// with the Sign.exe utility.
// Verify the signature on the C:\Winnt40\System32\Signature.dll file.
                                 bSignature)) {
    return CRYPT_FAILED;
// Load the DLL with the LoadLib function, then acquire pointers to 
// the member functions with the GetProcAddress function.

Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2014 Microsoft