K
kevin
Does any one know how to pass a function pointer as a function parameter
from VB .NET to a C dll?
Currently I'm passing it this way
Public Delegate Sub DSCUserInterruptFunction()
Public Declare Function dscUserInt Lib "dscud.dll" (ByVal board As Short,
ByRef dscuserint As dscUserInt, <MarshalAs(UnmanagedType.FunctionPtr)> ByRef
functions As DSCUserInterruptFunction) As Byte
Public Sub count()
dscUserInt(board, dscuserint, AddressOf count)
But this isn't working. My program just crashes and exits. Any ideas?
from VB .NET to a C dll?
Currently I'm passing it this way
Public Delegate Sub DSCUserInterruptFunction()
Public Declare Function dscUserInt Lib "dscud.dll" (ByVal board As Short,
ByRef dscuserint As dscUserInt, <MarshalAs(UnmanagedType.FunctionPtr)> ByRef
functions As DSCUserInterruptFunction) As Byte
Public Sub count()
dscUserInt(board, dscuserint, AddressOf count)
But this isn't working. My program just crashes and exits. Any ideas?