Jump to content
Tuts 4 You

Help in converting C to Delphi pls


kolynet

Recommended Posts

Hi all,I have a small poker odds calculator a free software and would like to implement it into my delphi application. (HandOdds class) where we input players hole cards, dead cards, etc.
It will calculate the odds. Somehow i would like to call a class (in its DLL). OR just translate it to delphi style.Could someone help? I appreciate it !Here is the link to the source and binary of the calculator:https://mega.nz/#!wlAkUZbL!zj1A_GZE3kr1ib7mL4BdskeHAgh6u0j1bvtKiv2wPYY

Link to comment

@kolynet: that is not C code. That's C#. :) And, if you do a little bit of Googling, you'll learn that it's quite hard to call any .NET (including C#) code from native Delphi.


 


I see 4 options:


* create a special DLL in C++/CLI for that you can call from Delphi. Some random tutorial to get you started: https://harinadha.wordpress.com/2011/10/17/ximucppapi/


* convert that C# code into a COM component that you can call from Delphi. Again some random tutorial: http://www.codeproject.com/Articles/3511/Exposing-NET-Components-to-COMand ;https://msdn.microsoft.com/en-us/library/7fcfby2t.aspx


* use Delphi for .NET (Embarcadero Prism, or whatever it's called now).


* rewrite all that code in pure native Delphi.


 


But none of them are particularly good choices, sorry. Good luck with your project!


  • Like 1
Link to comment

@kolynet: that is not C code. That's C#. :) And, if you do a little bit of Googling, you'll learn that it's quite hard to call any .NET (including C#) code from native Delphi.

 

I see 4 options:

* create a special DLL in C++/CLI for that you can call from Delphi. Some random tutorial to get you started: https://harinadha.wordpress.com/2011/10/17/ximucppapi/

* convert that C# code into a COM component that you can call from Delphi. Again some random tutorial: http://www.codeproject.com/Articles/3511/Exposing-NET-Components-to-COMand ;https://msdn.microsoft.com/en-us/library/7fcfby2t.aspx

* use Delphi for .NET (Embarcadero Prism, or whatever it's called now).

* rewrite all that code in pure native Delphi.

 

But none of them are particularly good choices, sorry. Good luck with your project!

 

Thanks for the options provided, it helps a lot. Maybe an advise what would be my option? I would like to use the odds calculation from this project only. Hard to find usable resource for that on the web, not a popular topic!

Link to comment

Why money ?? This is a forum for free information on reversing. It 'a contradiction.Convert the project in Delphi is simple.Se uses tell me what is the problem you encountered? are tables of constants and functions very simple.

Link to comment

Kurapica can offer his services - thats fine.


 


Its not a crack request so you would be buying his expertise. Of course, if someone else offers to do it for free then you're in luck.


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...