Hello,
I am testing the LIN code sample for the .NET wrapper.
LIN Diagnostic Master VB.NET
The solution has a compilation error when calling the function:
Dim ptr As IntPtr
ptr = Marshal.AllocHGlobal(CInt(4 * allschedsize))
niXNET.PInvoke.nxdb_getProperty(ClstRef, niXNET.xNETConstants.nxPropClst_FrmRefs, allschedsize, ptr)
And it's normal because none of the definitions matches the ptr variable.
<DllImport(niXNETdll, EntryPoint:="nxdbGetProperty", CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function nxdb_getProperty(DbObjectRef As UInteger, PropertyID As UInteger, PropertySize As UInteger, ByRef PropertyValue As UInteger) As Integer
End Function
<DllImport(niXNETdll, EntryPoint:="nxdbGetProperty", CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function nxdb_getProperty(DbObjectRef As UInteger, PropertyID As UInteger, PropertySize As UInteger, ByVal PropertyValue() As UInteger) As Integer
End Function
<DllImport(niXNETdll, EntryPoint:="nxdbGetProperty", CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function nxdb_getProperty(DbObjectRef As UInteger, PropertyID As UInteger, PropertySize As UInteger, ByRef PropertyValue As Double) As Integer
End Function
<DllImport(niXNETdll, EntryPoint:="nxdbGetProperty", CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function nxdb_getProperty(DbObjectRef As UInteger, PropertyID As UInteger, PropertySize As UInteger, PropertyValue As System.Text.StringBuilder) As Integer
End Function
Has anybody the good conversion working?
I've tried some unsuccessfully...:(
Thank you!
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi cidmi, shouldn't you be posting this on the discussion forum instead of the example code section? This section is usually for example code that is working and meant for the public to use the code.