How do I declare a following types:
Expand|Select|Wrap|Line Numbers
- char**
- unsigned char**
C++ function signature
Expand|Select|Wrap|Line Numbers
- -----------------------------------------------------------------------------------------------------------
- extern "C" __declspec(dllimport) int Get
- (int* pEnrollNumber,
- char** EnrollNames,
- int* EnrollIDs,
- unsigned char** EnrollTemplates,
- int* EnrollTemplateSizes,
- int Delay);
- -----------------------------------------------------------------------------------------------------------
but it throws an AccessViolation Exception.
If I declare a char** (for char**) and byte** (instead of unsigned char**) I still get the same exception but it seems to me the problem in this case is because of
parameters i pass to the function(i'm not quite sure how to declare it..)
C# declarations i tried:
Expand|Select|Wrap|Line Numbers
- [DllImport("TLib.dll")]
- private static extern int EnrollGet
- ( ref int pEnrollNumber, char** EnrollNames,
- ref int EnrollIDs,
- byte** EnrollTemplates,
- ref int EnrollTemplateSizes,
- int Delay);
- or
- [DllImport("TLib.dll")]
- private static extern int EnrollGet
- ( ref int pEnrollNumber,
- out IntPtr EnrollNames,
- ref int EnrollIDs,
- out IntPtr EnrollTemplates,
- ref int EnrollTemplateSizes,
- int Delay);
Thanks in advance