Results 1 to 2 of 2

Thread: need to help regarding char array

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    4

    Exclamation need to help regarding char array

    hi all


    here iam using x25 protocol,which was developed using C language.

    in this they used declare a variable as a charecter array in a structure as here

    struct x25data
    {
    OSINT xd_len; /* Length in bytes of xd_data */
    char xd_data[XD_DATALEN]; /* Data buffer address */
    };

    how can i write that xd_data in C#

    can any one help me in this.

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: need to help regarding char array

    try this:

    Code:
    struct x25data
    {
         public OSINT xd_len; 
         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = XD_DATALEN)]
         public string xd_data;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width