1
I’m having a hard time rewriting a method of a dll in C#, we bought a price checker from a manufacturer, in case it provides a dll and an example code in Delphi.
This dll has some functions between them start the service with the reader, read the data, check which devices are connected, etc. In case I want to transform this method:
function bReceiveBarcode(var stAddress; var BarCode: PChar): Boolean;
stdcall;
In a method available in C#, so I tried to create this method:
[DllImport("VP.dll", EntryPoint = "bReceiveBarcode")]
private static extern Boolean bReceiveBarcode(ref stAddress, ref string barcode);
In the case stAddress is a struct, I am trying to use this method in my application, but error appears Identificador esperando
it is as if the first parameter is wrong.
has to have a type in the parameter...
ref stAddress
tryref object stAddress
– Rovann Linhalis