G
Guest
I'm trying to load this structure for a call to DeviceIoControl:
typedef struct _NDISUIO_QUERY_OID {
NDIS_OID Oid;
PTCHAR ptcDeviceName;
UCHAR Data[sizeof(ULONG)];
} NDISUIO_QUERY_OID, *PNDISUIO_QUERY_OID;
I created the equivalent in VB:
<StructLayout(LayoutKind.Sequential)> _
Public Class NDISUIO_QUERY_OID ' nuiouser.h
Public Oid As Int32
Public ptcDeviceName As IntPtr
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=4)> _
Public Data As String
End Class
What I need to proceed is: How do I get the pointer to my DeviceName string
to plug into ptcDeviceName? If it was C, I could just do ptcDeviceName =
&DeviceName -- I don't know how to do this in VB.
Thanks for any help,
Steve
typedef struct _NDISUIO_QUERY_OID {
NDIS_OID Oid;
PTCHAR ptcDeviceName;
UCHAR Data[sizeof(ULONG)];
} NDISUIO_QUERY_OID, *PNDISUIO_QUERY_OID;
I created the equivalent in VB:
<StructLayout(LayoutKind.Sequential)> _
Public Class NDISUIO_QUERY_OID ' nuiouser.h
Public Oid As Int32
Public ptcDeviceName As IntPtr
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=4)> _
Public Data As String
End Class
What I need to proceed is: How do I get the pointer to my DeviceName string
to plug into ptcDeviceName? If it was C, I could just do ptcDeviceName =
&DeviceName -- I don't know how to do this in VB.
Thanks for any help,
Steve