CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    39

    Unhappy What's wrong with my code..?

    Imports System.Runtime.InteropServices

    <StructLayout(LayoutKind.Sequential)> _
    Public Structure WSAData
    Dim wVersion As Short
    Dim wHighVersion As Short
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=WSADESCRIPTION_LEN + 1)> _
    Dim szDescription As Char
    Dim szSystemStatus As String
    Dim iMaxSockets As UInt16
    Dim iMaxUdpDg As UInt16
    Dim lpVendorInfo As Int32
    End Structure

    Error message "type MarshalAs is not defined"

    really don't know how to do it~~... can anyone help me on this?

  2. #2
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: What's wrong with my code..?

    Try using the fullpath: <System.Runtime.InteropServices.MarshalAs(..)>
    Good Luck,
    -Cool Bizs

  3. #3
    Join Date
    Nov 2004
    Posts
    39

    Unhappy Re: What's wrong with my code..?

    Quote Originally Posted by coolbiz
    Try using the fullpath: <System.Runtime.InteropServices.MarshalAs(..)>
    Still cannot... because when i put (System.Runtime.InteropServices.) there has no MarshalAs... why everyone can do it but then i couldn't do it ?

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

Featured