Help with Run-Time Check Failure #0

  • Thread starter Thread starter Mike Carr
  • Start date Start date
M

Mike Carr

I am not sure where to turn, I have dropped a message in
microsoft.public.dotnet.framework.interop with no response. Can someone
point me in the right direction?

Can anyone tell me why my function:
public int pingPhone()
{
return 0;
}
comes across in the tlb as:
HRESULT _stdcall pingPhone([out, retval] long* pRetVal);

I need it to be:
HRESULT _stdcall pingPhone([out, retval] int* pRetVal);

Any ideas?

When I try to access the function (long*) from C++, I get Run-Time Check
Failure #0
 
Mike,
I am not sure where to turn, I have dropped a message in
microsoft.public.dotnet.framework.interop with no response.

Less than two hours before you posted this. You've got to have more
patience.

comes across in the tlb as:
HRESULT _stdcall pingPhone([out, retval] long* pRetVal);

I need it to be:
HRESULT _stdcall pingPhone([out, retval] int* pRetVal);

Any ideas?

Same thing.

When I try to access the function (long*) from C++, I get Run-Time Check
Failure #0

I don't think it has anything to do with the parameter type.



Mattias
 
You are right, I do need to be more patient. I have been working on this
problem for a week now and I almost have it. I guess you can say that I am
getting really excited about the thought of not having to write the same app
in C++.

The CSharp call looks like this:
public int pingPhone()

{


return 0;

}

If I replace the int with void, all is good.

--
MICHAEL CARR

Mattias Sjögren said:
Mike,
I am not sure where to turn, I have dropped a message in
microsoft.public.dotnet.framework.interop with no response.

Less than two hours before you posted this. You've got to have more
patience.

comes across in the tlb as:
HRESULT _stdcall pingPhone([out, retval] long* pRetVal);

I need it to be:
HRESULT _stdcall pingPhone([out, retval] int* pRetVal);

Any ideas?

Same thing.

When I try to access the function (long*) from C++, I get Run-Time Check
Failure #0

I don't think it has anything to do with the parameter type.



Mattias
 
Back
Top