Fermé

C# integration with COM component in Delphi

Hello,

I trying to write a software in C# that make calls in a .dll wrote in Delphi.

Im trying to call this method (wrote in delphi):

-------------

Function Recebe_Cartao (var Matriz : array [ 1..721 ] of char) : boolean

-------------

In my C# code, I declare like this:

---------------

[DllImport("[url removed, login to view]", CharSet = [url removed, login to view])]

public static extern bool Recebe_Cartao( char[][] data);

---------------

The problem is when I call in C# this method in my console application:

------------

Recebe_Cartao(RetornoMatriz);

-------------

I get an error: Cannot marshal 'parameter #1': There is no marshaling support for nested arrays.

I found a solution in: [url removed, login to view] but I still dont know how to fix my code.

You can download my project in: [url removed, login to view]

Main objective: I need loop through all values of RetornoMatriz array.

Thanks

Marcelo

Compétences : Programmation C#, Delphi, Architecture Logicielle

Voir plus : marshaling support nested arrays, thread programming, static programming, sharp component, public programming, programming forums, programming delphi, write objective, function programming, loop programming, programming static, programming loop, programming extern, programming char, programming boolean, programming arrays, programming array, char programming, boolean programming, array sharp programming, array programming, delphi integration, programming objective, objective programming, objective code

Concernant l'employeur :
( 5 commentaires ) So Paulo, Brazil

N° du projet : #1667095

4 freelance ont fait une offre moyenne de 63 $ pour ce travail

AlosDeveloper

Hello, i have 11 years experince in Delphi and C#. Please attach project from Delphi too.

100 $ USD en 1 jour
(43 Commentaires)
6.8
kissattila

The test program has a lot of communication errors, but I think it was problem with the declaration...

50 $ USD en 1 jour
(0 Commentaires)
0.0
huyensonus

I fixed it. Plz read private message

50 $ USD en 0 jours
(0 Commentaires)
0.0
rajeemcariazo

I believe my skills and experience are relevant for the task.

50 $ USD en 1 jour
(0 Commentaires)
0.0