T
Tom
Hi newsgroup,
I have read a lot af articles about marshalling in C#, but none of
them could help me to solve the following problem:
There is a C-DLL with the following header-file:
++++++++ C Header file start ++++++++++++++++++++++++++++++
#ifndef __UFISC_H
#define __UFISC_H
#ifdef UFISC_EXPORTS
#define UFIS __declspec( dllexport )
#else
#ifdef UFISC_IMPORTS
#define UFIS __declspec( dllimport )
#else
#define UFIS
#endif
#endif
//Some more code originated here
#pragma pack(push, 1)
#ifdef __cplusplus
extern "C"
{
#endif
//some more code originated here
extern unsigned char UFIS * ufisConvertToBmp24(int handle);
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif
++++++++ C Header file end ++++++++++++++++++++++++++++++
I need to call the function ufisConvertToBmp24 out of my C# program.
For this I wrote
[DllImport ("ufisc.dll")]
private static extern char [] ufisConvertToBmp24(int handle);
I think, this already is incorrect.
How can I call the ufisConvertToBmp24 function and retrieve the
correct value in my C# prog ?
Thanks for any help of you specialists
)
Greets
Tom
I have read a lot af articles about marshalling in C#, but none of
them could help me to solve the following problem:
There is a C-DLL with the following header-file:
++++++++ C Header file start ++++++++++++++++++++++++++++++
#ifndef __UFISC_H
#define __UFISC_H
#ifdef UFISC_EXPORTS
#define UFIS __declspec( dllexport )
#else
#ifdef UFISC_IMPORTS
#define UFIS __declspec( dllimport )
#else
#define UFIS
#endif
#endif
//Some more code originated here
#pragma pack(push, 1)
#ifdef __cplusplus
extern "C"
{
#endif
//some more code originated here
extern unsigned char UFIS * ufisConvertToBmp24(int handle);
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif
++++++++ C Header file end ++++++++++++++++++++++++++++++
I need to call the function ufisConvertToBmp24 out of my C# program.
For this I wrote
[DllImport ("ufisc.dll")]
private static extern char [] ufisConvertToBmp24(int handle);
I think, this already is incorrect.
How can I call the ufisConvertToBmp24 function and retrieve the
correct value in my C# prog ?
Thanks for any help of you specialists

Greets
Tom