Hello!

I need to get in VBScript-program list of the Crypto-Providers (CSP)
installed in the System.

There is function called СryptEnumProviders in CryptoApi
and the example of its usage here:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptenumproviders.asp[/url]
and here
[url]http://www.rsdn.ru/article/crypto/usingcryptoapi.xml[/url]
(bellow)


DWORD dwIndex=0;
DWORD dwType;
DWORD cbName;
LPTSTR pszName;

while (CryptEnumProviders(dwIndex, NULL, 0, &dwType, NULL, &cbName))
{
if (!cbName)
break;

if (!(pszName = (LPTSTR)LocalAlloc(LMEM_ZEROINIT, cbName)))
return;

if (!CryptEnumProviders(dwIndex++, NULL, 0, &dwType, pszName,
&cbName))
{
Error("CryptEnumProviders");
return;
}

std::cout<<"--------------------------------"<<std::endl;
std::cout<<"Provider name: "<<pszName<<std::endl;
std::cout<<"Provider type: "<<dwType<<std::endl;

LocalFree(pszName);
}

Please, help me to make such code in VBScript.
I'm trying to do it, by using CAPICOM, but I couldn't find any object
in it, wich could help me.
Thanks!



--
Andremon
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------