Pass pointer from c# to C++ wrapper
- From: "mo@xxxxxxxxxxxx" <mo@xxxxxxxxxxxx>
- Date: 20 Sep 2006 05:13:40 -0700
I have a C++.net wrapper class to a C++ library... A function takes in
a pointer in the wrapper... How do I pass that in C#??? Any help would
be appreciated, Thank you.
// functions in original c++ library
prCAPI PR_StartSDK( prVoid );
prCAPI PR_FinishSDK( prVoid );
prCAPI PR_GetDeviceList( prUInt32* pBufferSize, prDeviceList*
pDeviceList );
// functions in c++.net wrapper
int _PR_StartSDK()
{
return PR_StartSDK();
}
int _PR_FinishSDK()
{
return PR_FinishSDK();
}
int _PR_GetDeviceList( prUInt32 *pBufferSize, prDeviceList* pDeviceList
)
{
return PR_GetDeviceList( pBufferSize, pDeviceList );
}
// function calls in c#
int a = c._PR_StartSDK(); // WORKS
int b = c._PR_FinishSDK(); // WORKS
uint e;
prDeviceList f;
int d = c._PR_GetDeviceList( e, f );
// errors returned when building
- The best overloaded method match for
'tester.Class1._PR_GetDeviceList(uint*, prDeviceList*)' has some
invalid arguments
- Argument '1': cannot convert from 'uint' to 'uint*'
- Argument '2': cannot convert from 'prDeviceList' to 'prDeviceList*'
.
- Follow-Ups:
- Re: Pass pointer from c# to C++ wrapper
- From: ThunderMusic
- Re: Pass pointer from c# to C++ wrapper
- Prev by Date: load assemly dinamically in to applicatin
- Next by Date: Re: Any ideas on this?
- Previous by thread: load assemly dinamically in to applicatin
- Next by thread: Re: Pass pointer from c# to C++ wrapper
- Index(es):