Login | |
|
 |
СryptEnumProviders in VBScript - 11/9/2006 9:52:48 PM
|
|
 |
|
| |
Andremon
Posts: 1
Score: 0
Joined: 11/9/2006
Status: offline
|
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: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptenumproviders.asp and here http://www.rsdn.ru/article/crypto/usingcryptoapi.xml (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!
|
|
| |
|
|
|
 |
RE: СryptEnumProviders in VBScript - 11/13/2006 2:11:16 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
Well if the CryptoApi does not expose a COM interface (and I see nothing that indicates that it does) then it would be very difficult to get it to work in VBS.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|