RE: char[4] data type in c for storing IPs - VB.NET equivalence

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



'unsigned char' is Byte in VB.
As an example, the equivalent to the following C++:
unsigned char test[4];
is:
Dim test(3) As Byte
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI


"emitojleyes" wrote:

Hi everyone:
i read from the documentation of a dll that there is a struct that uses
char[4] for storing an IP address. How can it be? and how come i can get to
representate the same value in a string VB.NET data type, knowing that this
is its equivalence (for char4)?
Next is the data type definition


'''unsigned char[4]

<System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=4)> _

Public IP As String



Thanks very much for your help!
--
Emilio Javier Leyes
Técnico Universitario en Informática
Sistema de Emergencias 911
Salta, Argentina
.



Relevant Pages

  • RE: char[4] data type in c for storing IPs - VB.NET equivalence
    ... you say the data type must be byte... ... I tried replacing string for byte in: ... Sistema de Emergencias 911 ... C++ to Java ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Storing time values via jdbc thin driver
    ... In Oracle you don't have just time anyway. ... Java knows Time and Date, ... There is a date data type which has a time ... string or character value. ...
    (comp.databases.oracle.server)
  • Re: How to retrieve the length from unsigned char data type?
    ... unsigned char data will only represent text strings. ... Unless there is compelling reasons to assume 8-bit-only characters, ... you *always* get the length of a character string. ... Note that sizeof() a string includes the terminal NUL character. ...
    (microsoft.public.vc.mfc)
  • Re: Convert output from MD5 to printable ascii
    ... // compute MD5 hash ... md5_csum(in, 64, pout); ... How do I copy the contents to a string (unsigned char pointer) ... I'm completely lost in the C jungle of string manipulation.. ...
    (comp.lang.c)
  • Re: unsigned char array -> buffer
    ... > I create a com object, which loads a jpg image and then I request that ... > image from the com object with the method getImgData(). ... > unsigned char. ... Making that a string should be a simple matter of ...
    (comp.lang.python)