User Profile

Collapse

Profile Sidebar

Collapse
ManUtdFans
ManUtdFans
Last Activity: Aug 16 '10, 04:18 AM
Joined: Jul 2 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ManUtdFans
    started a topic Delphi DLL TDateTime call from C#

    Delphi DLL TDateTime call from C#

    I got a Delphi DLL function using D2007 has parameter type of Double (used for as TDateTime).

    I tried to call from C#:
    eg.
    DateTime week;
    week = DateTime.Now;

    myDLLFunc(week. Date);

    I got a runtime error:
    Cannot marshal 'parameter #1': Invalid managed/unmanaged type combination(the DateTime class must be paired with Struct).

    What should I pass the date paramet...
    See more | Go to post

  • How to call a function in a Delphi DLL from C# - PChar as parameter

    I have a Delphi DLL function:
    function GetMyNickName(a MyName: PChar): PChar; stdcall;

    This will return my nickname.

    In ASP.NET, C#:
    [DllImport("Test DLL.dll", EntryPoint = "GetMyNickName" ,
    ExactSpelling = false, CallingConventi on = CallingConventi on.Cdecl)]
    static extern string GetMyNickName(s tring aMyName);


    In the button on click event:...
    See more | Go to post
No activity results to display
Show More
Working...