Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi there,

I'm trying to call a DLL (non-COM) and I need to convert some structs from C notation to VB.NET

I have it working in VB6 but since we're moving on we need it in .NET too

typedef struct
{
 long          id;             /* id                        */
 unsigned char len;            /* length of message: 0-8    */
 unsigned char msg_lost;       /* count of lost rx-messages */
 unsigned char reserved[2];    /* reserved                  */
 unsigned char data[8];        /* 8 data-bytes              */
} CMSG;


typedef struct
{
 long          evid;          /* event-id                   */
 unsigned char len;           /* length of message: 0-8     */
 unsigned char reserved[3];   /* reserved                   */
 union
 {
   unsigned char  c[8];
   unsigned short s[4];
   unsigned long  l[2];
 } evdata;
} EVMSG;


typedef struct
{
 unsigned short hardware;
 unsigned short firmware;
 unsigned short driver;
 unsigned short dll;
 unsigned long  boardstatus;
 unsigned char  boardid[16];
} CSTATUS;

When using the upgrade tool I get some strange suggestions and TODO's and it has to be possible to do this in a simple matter. No?

 

Any help appreciated

/Kejpa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...