Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 30th, 2005, 8:04 PM   #1
MaxDinosaur
Newbie
 
Join Date: Jul 2005
Posts: 1
Rep Power: 0 MaxDinosaur is on a distinguished road
The Grand Programming Language Reunion (Delphi->C)

This is probably the worst thing I've ever tried to do, but I'm going to attempt to try to do it anyway.

I have a whole bunch of C functions that I wrote for a project at one point. Well, since I'm now attempting to do this graphically, is there a way to call these functions from Delphi, without needing to rewrite them.

Now I'm assuming that there is, but there are a few problems with the functions: The first is, they all return a value of some sort (I'm pretty sure all integers). But more importantly, they all accept 2 values (eventually all 1-2 integers, and a string [or char[] or char * as needed]).

Is there actually a way to call these functions (possibly by compiling the C code into another form...maybe?)? Or should I go ahead and rewrite all of them (just around 90-100).
MaxDinosaur is offline   Reply With Quote
Old Aug 7th, 2005, 11:03 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I think the best way is to compile the C functions into a DLL (Dynamic Link Library) - then you should be able to call the functions from the DLL in your Delphi project. MSDN will help you with making the DLL, but unfortunately I don't know nearly enough Delphi to help you with the second part.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:53 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC