I have to use a dll written in C in a C# VS project.
I have some difficulties to translate and use the structures declared in C.
structure of the trend list :
WV_PARAMETER_ID WvParameterID [WV_MAX_TREND_PARAMETERS]; ;
TCHAR Label [WV_MAX_TREND_PARAMETERS] [WV_LABEL_SIZE] ;
} WV_TREND_LIST ;
WV_MAX_TREND_PARAMETERS = 60
WV_LABEL_SIZE = 20
The problem I have is that there is only one returned value for the "NumberOfTrends" but 60 for the others. Then I found that I need to create the structures as follow.
This is working.
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct WV_TREND_LIST
View Complete Post