Schlsp.h
-
I am programing a Socket with SSL,so i m using various header files for encrytion,ssl protocol #include <wincrypt.h> #include <wintrust.h> #include <Schnlsp.h> (these header files r in stdafx.h) when i compiling my program is showing errors,eg c:\program files\microsoft visual studio\vc98\include\schnlsp.h(118) : error C2501: 'ALG_ID' : missing storage-class or type specifiers when click on the error typedef struct _SecPkgCred_SupportedAlgs { DWORD cSupportedAlgs; ALG_ID *palgSupportedAlgs; } SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs; when i check this strucure in msdn i found data type ALG_ID is defined in the Wincrypt.h header file. when i check wincrypt i found that a macro has to be define #if(_WIN32_WINNT >= 0x0400)for using wincrypt.h so i defined #define _WIN32_WINNT 0x0500 in stdafx.h before any header file is defined now when i again compile the program D:\sunit\controleon\Working\CSocket\sslsocket.cpp(611) : error C2039: 'dwFlags' : is not a member of '_SCHANNEL_CRED' c:\program files\microsoft visual studio\vc98\include\schnlsp.h(129) : see declaration of '_SCHANNEL_CRED' i found the struct _SCHANNEL_CRED in schnlsp.h file typedef struct _SCHANNEL_CRED { DWORD dwVersion; DWORD cCreds; PCCERT_CONTEXT *paCred; HCERTSTORE hRootStore; DWORD cMappers; struct _HMAPPER **aphMappers; DWORD cSupportedAlgs; ALG_ID *palgSupportedAlgs; DWORD grbitEnabledProtocols; DWORD dwMinimumCipherStrength; DWORD dwMaximumCipherStrength; DWORD dwSessionLifespan; } SCHANNEL_CRED, *PSCHANNEL_CRED; where as in msdn typedef struct _SCHANNEL_CRED { DWORD dwVersion; DWORD cCreds; PCCERT_CONTEXT * paCred; HCERTSTORE hRootStore; DWORD cMappers; struct _HMAPPER ** aphMappers; DWORD cSupportedAlgs; ALG_ID * palgSupportedAlgs; DWORD grbitEnabledProtocols; DWORD dwMinimumCipherStrength; DWORD dwMaximumCipherStrength; DWORD dwSessionLifespan; DWORD dwFlags; DWORD reserved; } SCHANNEL_CRED, *PSCHANNEL_CRED; as in my proram i m using dwFlags i m not understanding where is the problem. Thanx for any suggesstion -- modified at 5:42 Friday 9th September, 2005