B
Boni
Dear sirs/madam,
I am trying to dynamically invoke assembly. (For some days Tomas helped me
to get it compiled). Now I am so far that I can test if the assembly
invoked. And I get the System.ExecutionEngineException at the time of
Invoke. Apparenty it is because of the cast of parameter 4 or may be because
GC? I tried to pin it but get compiler error, that only pointers can be
pinned.
I would very appreciate any help.
Thanks,
Details:
void AAA::Execute ( Object* Application, int hwndOwner, Object*
(*ContextParams) __gc[], Object* (*ContextParams8) __gc[],
EnvDTE::wizardResult __gc* retval){
Object* arr __gc[];
arr = new Object*[5];
arr[0] =Application;
arr[1] =__box(hwndOwner);
arr[2] =reinterpret_cast<Object*> (*ContextParams);
arr[3] =reinterpret_cast<Object*> (*ContextParams8);
arr[4]=reinterpret_cast<Object*>(retval); //<<This case latter error
arr[4]=NULL; //<<No error, assembly invoked fine!!!
.....
m_Execute->Invoke(m_Instance, arr); //Exception thrown at this place !!!!
I am trying to dynamically invoke assembly. (For some days Tomas helped me
to get it compiled). Now I am so far that I can test if the assembly
invoked. And I get the System.ExecutionEngineException at the time of
Invoke. Apparenty it is because of the cast of parameter 4 or may be because
GC? I tried to pin it but get compiler error, that only pointers can be
pinned.
I would very appreciate any help.
Thanks,
Details:
void AAA::Execute ( Object* Application, int hwndOwner, Object*
(*ContextParams) __gc[], Object* (*ContextParams8) __gc[],
EnvDTE::wizardResult __gc* retval){
Object* arr __gc[];
arr = new Object*[5];
arr[0] =Application;
arr[1] =__box(hwndOwner);
arr[2] =reinterpret_cast<Object*> (*ContextParams);
arr[3] =reinterpret_cast<Object*> (*ContextParams8);
arr[4]=reinterpret_cast<Object*>(retval); //<<This case latter error
arr[4]=NULL; //<<No error, assembly invoked fine!!!
.....
m_Execute->Invoke(m_Instance, arr); //Exception thrown at this place !!!!