When I call CryptRegisterOIDInfo with pInfo parameter pointing on "old-style" CRYPT_OID_INFO structure (cbSize = 28) without pwszCNGAlgid and pwszCNGExtraAlgid members, I get error about invalid parameter. If use CRYPT_OID_INFO with new members (csSize = 36) it's OK.
Usually, there are back-compatibility in CryptoAPI for such changes...
The repro-example is:
typedef struct _CRYPT_OID_INFO_LH { DWORD cbSize; LPCSTR pszOID; LPCWSTR pwszName; DWORD dwGroupId; union { DWORD dwValue; ALG_ID Algid; DWORD dwLength; }; CRYPT_DATA_BLOB ExtraInfo; LPCWSTR pwszCNGAlgid; LPCWSTR pwszCNGExtraAlgid; } CRYPT_OID_INFO_LH, *PCRYPT_OID_INFO_LH;
CRYPT_OID_INFO OIDInfo = { sizeof(CRYPT_OID_INFO), "1.2.3", L"Test", CRYPT_ENHKEY_USAGE_OID_GROUP_ID }; CRYPT_OID_INFO_LH OIDInfoLH = { sizeof(CRYPT_OID_INFO_LH), "1.2.3", L"Test", CRYPT_ENHKEY_USAGE_OID_GROUP_ID }; OIDInfoLH.pwszCNGAlgid = L""; OIDInfoLH.pwszCNGExtraAlgid = L"";
DWORD dwError; BOOL res; res = CryptRegisterOIDInfo(&OIDInfo, 0); // res: FALSE dwError = GetLastError(); //dwError :0x80070057 res = CryptRegisterOIDInfo((PCCRYPT_OID_INFO)&OIDInfoLH, 0); //res: TRUE

Problem with CryptRegisterOIDInfo in Microsoft "Longhorn" Se
Windows Vista
User login
Related topics
- Visual Studio 6 and Visual Source Safe 6 on Vista
- please help! very big issue
- Vista annoyances
- "Read Only"
- Canon printer drivers killed IE
- Start Auto Logon
- Canon iP4200 printer
- optional updates
- Search
- aero glass w/945gm chipset
- "Burn" iso file to HD or partition
- What free security software would you recommend for Vista?
- Instalation problems with Vista Beta 2
- ATI X700 PCI Express Drivers wont load
- Rapid scroll in Addressbook
- More additional clocks.
- about dos command
- Cool 'n' Quiet or stuck at 800Mhz
- media music
- Dual Size 10 Army Boot Dilema
- AMD drivers
- Canon EOS 20 D
- Acer Aspire 1620
- Image metadata format
- Thumbnails
- Locked Out
- Vista on Domains
- Should I download the 64 Bit Edition
- Dirvers for SMC2802W 2.4GHz 54 Mbps Wireless PCI Adapter
- Only key for "Home Basic"?
- Anybody care about instrcutions how to install Vista using P
- Beta Drivers
- Windows Mobile Device Centre
- all my cd-rom and dvd roms are gone?
- Product Keys
- Windows Media Player does'nt work anymore
- Inernet ??
- HP Pavilion DV1688US has no audio