Y
yucikala
Hello, I'm a "expert of beginner" in C#.
I have a dll - in C. And in this dll is this struct:
typedef
struct msg_s { /* please make duplicates of strings before next call
to emi_read() ! */
int op_type; /* of "op_t" type: operation type; submit (>0), response
(<0) */
union {
struct {
const char* from;
const char* to;
const char* notif_addr;
int notif_type; /* not_t */
const char* validity; /* DDMMYYHHmm */
const char* timestamp; /* DDMMYYHHmmss */
dst_t deliv_status;
int deliv_reasoncode;
const char* deliv_timestamp; /* DDMMYYHHmmss */
const char* text;
int priority;
int bit8; /* data coding scheme */
int numbits; /* number of bits in TD (text) if bit8=1 */
int msg_class;
int rpid; /* rpid == -1 => use RPID value "0000" */
/* rpid == 0 => do not use RPID value */
const char* xservices; /* extra services */
} submit;
struct {
int ack;
int errcode;
const char* sysmsg;
} response;
} uu;
} msg_t;
How can I use this struct in C#?
How can I make in C# the same code as is in C:
msg_t* msg = 0;
msg = emi_msg( emi); //emi_msg is a function whitch return a pointer
optyp = msg->op_type;
Thanks a lot
Pavel Spaleny
I have a dll - in C. And in this dll is this struct:
typedef
struct msg_s { /* please make duplicates of strings before next call
to emi_read() ! */
int op_type; /* of "op_t" type: operation type; submit (>0), response
(<0) */
union {
struct {
const char* from;
const char* to;
const char* notif_addr;
int notif_type; /* not_t */
const char* validity; /* DDMMYYHHmm */
const char* timestamp; /* DDMMYYHHmmss */
dst_t deliv_status;
int deliv_reasoncode;
const char* deliv_timestamp; /* DDMMYYHHmmss */
const char* text;
int priority;
int bit8; /* data coding scheme */
int numbits; /* number of bits in TD (text) if bit8=1 */
int msg_class;
int rpid; /* rpid == -1 => use RPID value "0000" */
/* rpid == 0 => do not use RPID value */
const char* xservices; /* extra services */
} submit;
struct {
int ack;
int errcode;
const char* sysmsg;
} response;
} uu;
} msg_t;
How can I use this struct in C#?
How can I make in C# the same code as is in C:
msg_t* msg = 0;
msg = emi_msg( emi); //emi_msg is a function whitch return a pointer
optyp = msg->op_type;
Thanks a lot
Pavel Spaleny