Imports System.Runtime.InteropServices
' function pointer
Dim func As IntPtr = Marshal.GetFunctionPointerForDelegate(New StatusDelegate(AddressOf StatusCallback))
'Set(func)
' delegate
Private Delegate Function StatusDelegate(ByVal ListData As IntPtr, <MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.U2)> ByVal pFieldsArray As UInt16(), ByVal dwCount As UInt32) As UInt32
Public Function StatusCallback(ByVal ListData As IntPtr, <MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.U2)> ByVal pFieldsArray As UInt16(), ByVal dwCount As UInt32)
Return 0
End Function
|