Click here to Skip to main content
15,891,184 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: depth first search help.. Pin
Adam Roderick J23-Jul-09 0:24
Adam Roderick J23-Jul-09 0:24 
QuestionHow to pass a pointer of data to the managed side on a C++ wrapper Pin
sinosoidal19-Jul-09 23:55
sinosoidal19-Jul-09 23:55 
AnswerRe: How to pass a pointer of data to the managed side on a C++ wrapper Pin
N a v a n e e t h20-Jul-09 15:25
N a v a n e e t h20-Jul-09 15:25 
AnswerRe: How to pass a pointer of data to the managed side on a C++ wrapper Pin
amatecki23-Jul-09 8:39
professionalamatecki23-Jul-09 8:39 
QuestionRegarding IWshRuntimeLibrary::IFileSystem Pin
V K 219-Jul-09 22:43
V K 219-Jul-09 22:43 
AnswerRe: Regarding IWshRuntimeLibrary::IFileSystem Pin
lakshman rao13-Jun-20 3:58
lakshman rao13-Jun-20 3:58 
GeneralRe: Regarding IWshRuntimeLibrary::IFileSystem Pin
Richard MacCutchan13-Jun-20 6:28
mveRichard MacCutchan13-Jun-20 6:28 
Questionneed help with "System.Runtime.InteropServices.SEHException" error Pin
UserNameless14-Jul-09 19:36
UserNameless14-Jul-09 19:36 
hey, i'm new to managed c++, and i need to use managed c++ to perform some tasks. I am using capicom.dll to create an application which will be able to sign, verify, encrypt,etc. only encrypt function requires the use of managed functions (to get file as bytes, convert to base-64 string and then encrypt), whereas the sign function does not require any managed code. even so, I am getting a System.Runtime.InteropServices.SEHException error on the signing function. here is the code which deals with the signing part:
if(cert->HasPrivateKey())
{
	signedData->Content = "This is a string";
	signer->PutCertificate(cert);
	_bstr_t text = signedData->Sign(signer,true,CAPICOM_ENCODE_BASE64);
	return text;
}


I have traced the code to fail at the Sign(signer,....) part. signer is the certificate being used to sign the data with, signedData and signer variables have been initialized with the __uuidof method, which is also how i've initialized encrypt and verify functions in their code sections.

the debugger takes me inside the capicom.tli file and fails. here is the tli code block which fails:

inline _bstr_t ISignedData::Sign ( struct ISigner * pSigner, VARIANT_BOOL bDetached, enum CAPICOM_ENCODING_TYPE EncodingType ) {
BSTR _result = 0;
HRESULT _hr = raw_Sign(pSigner, bDetached, EncodingType, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _bstr_t(_result, false);


pSigner, bDetached, and EncodingType get their proper values, but the _result variable keeps getting set to <undefined value>

any suggestions would be most welcomed on what i might do or what might be going wrong here.

the error on debugger output is (at line: raw_Sign(pSigner, bDetached, EncodingType, &_result); )

First-chance exception at 0x7c81eb33 in CAPICOMGUI.exe: Microsoft C++ exception: _com_error at memory location 0x0012d708..
A first chance exception of type 'System.Runtime.InteropServices.SEHException' occurred in CAPICOMGUI.exe
An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in CAPICOMGUI.exe

Additional information: External component has thrown an exception.


hope i was clear enough Unsure | :~
AnswerRe: need help with "System.Runtime.InteropServices.SEHException" error Pin
Richard Andrew x6414-Jul-09 20:36
professionalRichard Andrew x6414-Jul-09 20:36 
GeneralRe: need help with "System.Runtime.InteropServices.SEHException" error Pin
UserNameless14-Jul-09 20:57
UserNameless14-Jul-09 20:57 
GeneralRe: need help with "System.Runtime.InteropServices.SEHException" error Pin
Richard Andrew x6414-Jul-09 21:22
professionalRichard Andrew x6414-Jul-09 21:22 
GeneralRe: need help with "System.Runtime.InteropServices.SEHException" error Pin
UserNameless14-Jul-09 21:26
UserNameless14-Jul-09 21:26 
GeneralRe: need help with "System.Runtime.InteropServices.SEHException" error Pin
Richard Andrew x6414-Jul-09 21:35
professionalRichard Andrew x6414-Jul-09 21:35 
GeneralRe: need help with "System.Runtime.InteropServices.SEHException" error Pin
UserNameless14-Jul-09 21:44
UserNameless14-Jul-09 21:44 
QuestionC++/CLI being used with VB and VC++ Pin
Shadowsoal14-Jul-09 8:45
Shadowsoal14-Jul-09 8:45 
AnswerRe: C++/CLI being used with VB and VC++ Pin
N a v a n e e t h14-Jul-09 16:12
N a v a n e e t h14-Jul-09 16:12 
GeneralRe: C++/CLI being used with VB and VC++ Pin
Shadowsoal15-Jul-09 4:13
Shadowsoal15-Jul-09 4:13 
GeneralRe: C++/CLI being used with VB and VC++ Pin
Shadowsoal15-Jul-09 5:21
Shadowsoal15-Jul-09 5:21 
GeneralRe: C++/CLI being used with VB and VC++ Pin
N a v a n e e t h15-Jul-09 17:49
N a v a n e e t h15-Jul-09 17:49 
GeneralRe: C++/CLI being used with VB and VC++ Pin
Shadowsoal15-Jul-09 17:52
Shadowsoal15-Jul-09 17:52 
GeneralRe: C++/CLI being used with VB and VC++ Pin
N a v a n e e t h15-Jul-09 18:23
N a v a n e e t h15-Jul-09 18:23 
QuestionNeed to call C++ function callback from C code in a Windows Form app Pin
KawiRider13-Jul-09 15:44
KawiRider13-Jul-09 15:44 
AnswerRe: Need to call C++ function callback from C code in a Windows Form app Pin
Mark Salsbery14-Jul-09 6:48
Mark Salsbery14-Jul-09 6:48 
GeneralRe: Need to call C++ function callback from C code in a Windows Form app Pin
KawiRider14-Jul-09 8:59
KawiRider14-Jul-09 8:59 
GeneralRe: Need to call C++ function callback from C code in a Windows Form app Pin
Mark Salsbery14-Jul-09 9:49
Mark Salsbery14-Jul-09 9:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.