D
Don
I have a third party C++ DLL that I am trying to use from C#. The
specific function I am trying to use is declared in C++ as follows:
ladybugConvertToMultipleBGRU32(
LadybugContext context,
const LadybugImage* pimage,
unsigned char* arpszDestBuffers[ LADYBUG_NUM_CAMERAS ],
LadybugImageInfo* pImageInfo );
It is used, in C++, as follows (some code chopped for brevety):
unsigned char* arpTextureBuffers[ LADYBUG_NUM_CAMERAS ];
for(i = 0; i<LADYBUG_NUM_CAMERAS;i++)
{
arpTextureBuffers =
new unsigned char[LADYBUG_RAW_IMAGE_COLS * LADYBUG_RAW_IMAGE_ROWS *
4];
}
error = ladybugConvertToMultipleBGRU32(
ladybug,
&image,
&arpTextureBuffers[0],
NULL);
I have tried (unsuccessfully, for the past two days) many combinations
of DllImport function declarations and ways of constructing the item
to pass in the third parameter (&arpTextureBuffers[0]). I have seen a
zillion posts, but none have been close enough to help me. How do I
construct the DllImport function, and how to I create the appropriate
item to pass to the third parameter? Any help would be greatly
appreciated.
Thanks in advance,
Don
specific function I am trying to use is declared in C++ as follows:
ladybugConvertToMultipleBGRU32(
LadybugContext context,
const LadybugImage* pimage,
unsigned char* arpszDestBuffers[ LADYBUG_NUM_CAMERAS ],
LadybugImageInfo* pImageInfo );
It is used, in C++, as follows (some code chopped for brevety):
unsigned char* arpTextureBuffers[ LADYBUG_NUM_CAMERAS ];
for(i = 0; i<LADYBUG_NUM_CAMERAS;i++)
{
arpTextureBuffers =
new unsigned char[LADYBUG_RAW_IMAGE_COLS * LADYBUG_RAW_IMAGE_ROWS *
4];
}
error = ladybugConvertToMultipleBGRU32(
ladybug,
&image,
&arpTextureBuffers[0],
NULL);
I have tried (unsuccessfully, for the past two days) many combinations
of DllImport function declarations and ways of constructing the item
to pass in the third parameter (&arpTextureBuffers[0]). I have seen a
zillion posts, but none have been close enough to help me. How do I
construct the DllImport function, and how to I create the appropriate
item to pass to the third parameter? Any help would be greatly
appreciated.
Thanks in advance,
Don