Answer the question
In order to leave comments, you need to log in
How to initialize an object of class ICEnroll4?
Good day, I don't really understand cpp. VS2010 Gives an error Нарушение прав доступа при чтении "0x00000000"
As I understand it, this is due to the fact that pEnroll is not initialized, I don’t know how to initialize it, in the MSDN examples it is written exactly the same as mine. In general, I'm trying to create a certificate request using the Crypto Pro crypto provider, if someone knows a solution in Java, poke me.
#include <Windows.h>
#include <iostream>
#include <tchar.h>
#include <string>
#include <Xenroll.h>
#include <OleAuto.h>
#include <objbase.h>
using namespace std;
LPWSTR ProviderName = L"Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider";
HRESULT hr;
int main() {
ICEnroll4 * pEnroll = NULL;
hr = pEnroll->put_ProviderName(ProviderName);
hr = pEnroll->put_ProviderType(75);
hr = pEnroll->createFilePKCS10(L"CN=Name,L=City,C=RU", L"", L"test.der");
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question