Jochen Kühner
Level-3
- Beiträge
- 4.291
- Reaktionspunkte
- 527
-> Hier kostenlos registrieren
Ich brauche die 2 Funktionen in .NET.
Dazu habe Ich mir sie wie folgt unter der Klasse PDU hinzugefügt!
[DllImport("libnodave.dll"/*, PreserveSig=false */ )]
protected static extern void _daveAddParam(IntPtr p, byte[] buffer, int bytes);
public void addParam(byte[] buffer)
{
_daveAddParam(pointer, buffer, buffer.Length);
}
[DllImport("libnodave.dll"/*, PreserveSig=false */ )]
protected static extern void _daveAddData(IntPtr p, byte[] buffer, int bytes);
public void addData(byte[] buffer)
{
_daveAddData(pointer, buffer, buffer.Length);
}
bekomme jedoch immer eine AccessViaolationExcption, wenn Ich addParam ausführe. Hat jemand einen Tip???
Dazu habe Ich mir sie wie folgt unter der Klasse PDU hinzugefügt!
[DllImport("libnodave.dll"/*, PreserveSig=false */ )]
protected static extern void _daveAddParam(IntPtr p, byte[] buffer, int bytes);
public void addParam(byte[] buffer)
{
_daveAddParam(pointer, buffer, buffer.Length);
}
[DllImport("libnodave.dll"/*, PreserveSig=false */ )]
protected static extern void _daveAddData(IntPtr p, byte[] buffer, int bytes);
public void addData(byte[] buffer)
{
_daveAddData(pointer, buffer, buffer.Length);
}
bekomme jedoch immer eine AccessViaolationExcption, wenn Ich addParam ausführe. Hat jemand einen Tip???