Radio Data System (RDS) > MRDS1322

Development of interface software for the miniRDS in C#

(1/5) > >>

SteveyD:
Greetings

Anyone else out here working on a C# version of the mrdsio.dll example?


--- Code: ---procedure ConnectionSetup(ConMode, PortNum: integer; Bidirectional, Slow: boolean);
--- End code ---
using the Delphi pascal works fine for the LPT ports.

converting it to C#


--- Code: ---[DllImport("mrdsio.dll")]
        public static extern void ConnectionSetup(int ConMode, int PortNum, bool Bidirectional, bool Slow);
--- End code ---

PortNum = 0x378
PortNum = 378
PortNum = 888

None of the different PortNum defines will access the LPT1 in C#

Anyone know the reason?

SteveyD:
Sorted it out..  I was missing the Inpout32.dll  in the directory.

On to the next step.

SteveyD:
Jan

mrdsio.dll

Does the dll return a C-style array or SafeArray?

I've got everything working in C# except the Receive function

 

Jan:
It's probably no one from the two options.

If you can pass the array in the Send function, it should be possible to get it also using the Receive function as the array format is still the same.

The Delphi array declaration


--- Code: ---TData = array [0..255] of byte;
--- End code ---

is probably equal to


--- Code: ---BYTE TData[255];
--- End code ---

However if you know better format for the array to pass, the mrdsio.dll can be updated as it is still possible at this stage.

SteveyD:
Thanks Jan

The current Array function in Delphi is the best method at this point.

I've encountered some difficulty calling the Array from the mrdsio.dll in C#

Its most likely something I'm not doing correctly in the Receive routine as the Send routine works fine.

Navigation

[0] Message Index

[#] Next page

Reply

Go to full version