Results 1 to 2 of 2

Thread: Pointer to a Structure

  1. #1

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Pointer to a Structure

    How do I do a pointer to a structure correctly. It's obvious that System.IntPtr() only exepts values and not structures as well. I need this to get a DirectX8 function working in VB.NET. Thanks in advance.
    Last edited by Jacob Roman; Nov 20th, 2004 at 06:48 PM.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Dim ptr As IntPtr
    2.  
    3.         System.Runtime.InteropServices.Marshal.StructureToPtr(SomeStruct, ptr, True)
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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