• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

how can I call into a csharp dll from delphi

I need to call a procedure in a c-sharp library from delphi.  Project compiles, but causes an Access Violation when executed, before the project code is run (during load).
Here is my external declaration in delphi:

procedure OpenRxEntryForm(iToken: Integer; Prescription_id: AnsiString ) stdcall; external 'RxTracker.dll';
0
TheMatrixDuck
Asked:
TheMatrixDuck
  • 2
2 Solutions
 
Ephraim WangoyaCommented:
First get rid of the string


procedure OpenRxEntryForm(iToken: Integer; Prescription_id: PChar ) stdcall; external 'RxTracker.dll';
0
 
TheMatrixDuckAuthor Commented:
sorry... got rerouted to another issue.  Please leave this question open, I shall return.
0
 
TheMatrixDuckAuthor Commented:
ReRouted to another project branch.  Haven't tested the solution yet, but the answer is at least a partial solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now