Hi all,
I'm trying to convert a long c header file with a lot of structs to c# and
I'm getting the following error:
An unhandled exception of type 'System.TypeLoadException' occurred in
Unknown Module.
Additional information: Could not load type
......because it contains an object field at offset 0 that is incorrectly
aligned or overlapped by a non-object field.
There's a lot of others structs but it's very similar with the following
ones. Any help to convert in C# be apreciated !
TIA,
--
Andre
-------------------------------------------------------
// Win32 Specific definitions for Windows/NT 3.5
#pragma pack(8)
typedef unsigned long Handle_t;
typedef unsigned char Boolean;
#define _Int int
typedef unsigned long InvokeID_t;
typedef char DeviceID_t[64];
typedef long RoutingCrossRefID_t;
typedef long RouteRegisterReqID_t;
typedef struct
{
InvokeID_t invokeID;
union
{
CSTARouteRequestEvent_t routeRequest;
CSTARouteRequestExtEvent_t routeRequestExt;
CSTAReRouteRequest_t reRouteRequest;
CSTAEscapeSvcReqEvent_t escapeSvcReqeust;
CSTASysStatReqEvent_t sysStatRequest;
} u;
} CSTARequestEvent;
typedef struct CSTARouteRequestEvent_t {
RouteRegisterReqID_t routeRegisterReqID;
RoutingCrossRefID_t routingCrossRefID;
DeviceID_t currentRoute;
DeviceID_t callingDevice;
ConnectionID_t routedCall;
SelectValue_t routedSelAlgorithm;
Boolean priority;
SetUpValues_t setupInformation;
} CSTARouteRequestEvent_t;
typedef struct ConnectionID_t {
long callID;
DeviceID_t deviceID;
ConnectionID_Device_t devIDType;
} ConnectionID_t;
typedef struct Connection_t {
ConnectionID_t party;
SubjectDeviceID_t staticDevice;
} Connection_t;
typedef struct ConnectionList_t {
_Int count;
Connection_t FAR *connection;
} ConnectionList_t;
--------------------------------------------------