 |
14-07-2010, 11:44 AM
|
#1 (permalink)
|
|
Apprentice
Join Date: Oct 2008
Location: Baroda
Posts: 62
|
problem: Front end in C# and backend in C?
Is it possible to connect front end created in C#(visual studio) to a C file as a back end...?
i want to make a MD5 sum calculator for which i have prepared GUI in C# and i do have a C code that generates MD5 sum of a given file or text. the C code takes the file path or string as a command line arguments.....
GUI consist of two text boxes. one to input filename or text and other in which MD5 sum should be printed...
__________________
Ubuntu Natty Narwhal | RHEL 6 | Win XP
Windows is Past... Future is Open..!!
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
14-07-2010, 07:44 PM
|
#2 (permalink)
|
|
Broken In
Join Date: Oct 2008
Posts: 133
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by siddharthmakwana
Is it possible to connect front end created in C#(visual studio) to a C file as a back end...?
i want to make a MD5 sum calculator for which i have prepared GUI in C# and i do have a C code that generates MD5 sum of a given file or text. the C code takes the file path or string as a command line arguments.....
GUI consist of two text boxes. one to input filename or text and other in which MD5 sum should be printed...
|
yes
create the C code as a DLL project and use it in C# project
google on how to use C dll in c#
__________________
http://img694.imageshack.us/img694/7417/tempmp.jpg
How am I supposed to meet my freetard friends and talk about Linsux now?
|
|
|
14-07-2010, 07:55 PM
|
#3 (permalink)
|
|
God of Mistakes...
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
|
Re: problem: Front end in C# and backend in C?
Or you can "execute a command" (your C program executable) passing the parameter and return the string which can be displayed in the text box.
Though I recommend to write the program in C# instead of using it as a command.
|
|
|
14-07-2010, 11:23 PM
|
#4 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,489
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by Garbage
Though I recommend to write the program in C# instead of using it as a command.
|
Any reasons ? I've always assumed that code is much faster when executed in C compared to modern high level languages...
And for a digest algorithm this should be a human noticable time difference for larger files right ?
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
14-07-2010, 11:41 PM
|
#5 (permalink)
|
|
God of Mistakes...
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by MetalheadGautham
Any reasons ? I've always assumed that code is much faster when executed in C compared to modern high level languages...
And for a digest algorithm this should be a human noticable time difference for larger files right ?
|
That recommendation isn't because of the execution speed. But invoking (OS) commands from program is never considered as good option.
And BTW, read the following links please. Just for information.
Canned Platypus Blog Archive It’s Faster Because It’s C
Hacker News | It?s Faster Because It?s C
|
|
|
15-07-2010, 03:13 AM
|
#6 (permalink)
|
|
Broken In
Join Date: Oct 2008
Posts: 133
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by MetalheadGautham
Any reasons ? I've always assumed that code is much faster when executed in C compared to modern high level languages...
And for a digest algorithm this should be a human noticable time difference for larger files right ?
|
it is always speed vs effort
in this case if he implements both UI n BL in C# , he will effort with no penalty in speed
__________________
http://img694.imageshack.us/img694/7417/tempmp.jpg
How am I supposed to meet my freetard friends and talk about Linsux now?
|
|
|
16-07-2010, 02:00 PM
|
#7 (permalink)
|
|
XLr8
Join Date: Sep 2008
Posts: 637
|
Re: problem: Front end in C# and backend in C?
i developed a form applic in C# for finding duplicate files using md5 Hash.
used the md5 security class
it worked out quiet nicely for large files also.
for files of 3 - 10 GB used file splitting method. will post src code if you like.
---------- Post added at 02:00 PM ---------- Previous post was at 01:57 PM ----------
[QUOTE=lucifer_is_back;1262221
create the C code as a DLL project and use it in C# project
[/QUOTE]
this is what i think is the best method for using c codes in other langs.
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
|
|
|
|
18-07-2010, 11:00 AM
|
#8 (permalink)
|
|
God of Mistakes...
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
|
Re: problem: Front end in C# and backend in C?
Great... Host the project on Sourceforge or Github or GoogleCode or CodePlex and please provide a link.
And BTW, under which license are you publishing your code? I'm just curious...
|
|
|
18-07-2010, 06:38 PM
|
#9 (permalink)
|
|
XLr8
Join Date: Sep 2008
Posts: 637
|
Re: problem: Front end in C# and backend in C?
i did not create any class of my own, just used it.
i did it for request of friend of mine (avid collector of hindi songs) who was having same mp3 file multiple times over the drive.
i did not publish it anywhere, i will upload it to RS with src,(tomorrow)
change as u like
but tell me if u do smthing interesting with it
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
|
|
|
|
19-07-2010, 12:57 AM
|
#10 (permalink)
|
|
Apprentice
Join Date: Oct 2008
Location: Baroda
Posts: 62
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by arpanmukherjee1
i developed a form applic in C# for finding duplicate files using md5 Hash.
used the md5 security class
it worked out quiet nicely for large files also.
for files of 3 - 10 GB used file splitting method. will post src code if you like.
---------- Post added at 02:00 PM ---------- Previous post was at 01:57 PM ----------
this is what i think is the best method for using c codes in other langs.
|
i think CRC32 is enough for this purpose.....
__________________
Ubuntu Natty Narwhal | RHEL 6 | Win XP
Windows is Past... Future is Open..!!
|
|
|
19-07-2010, 02:49 PM
|
#11 (permalink)
|
|
God of Mistakes...
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by arpanmukherjee1
i did not create any class of my own, just used it.
i did it for request of friend of mine (avid collector of hindi songs) who was having same mp3 file multiple times over the drive.
i did not publish it anywhere, i will upload it to RS with src,(tomorrow)
change as u like
but tell me if u do smthing interesting with it
|
I will still insist to host the project on some site. It will be helpful for others as well as you for issue tracking and improvement.
|
|
|
28-07-2010, 09:37 AM
|
#13 (permalink)
|
|
XLr8
Join Date: Sep 2008
Posts: 637
|
Re: problem: Front end in C# and backend in C?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
anybody dwnloaded it yet
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
|
|
|
|
28-07-2010, 08:35 PM
|
#14 (permalink)
|
|
God of Mistakes...
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
|
Re: problem: Front end in C# and backend in C?
Will download and try tonight. Have to boot into Windows. :S
|
|
|
29-07-2010, 09:38 AM
|
#15 (permalink)
|
|
Broken In
Join Date: Oct 2008
Posts: 133
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by arpanmukherjee1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
anybody dwnloaded it yet
|
downloaded it
trying out
---------- Post added at 09:38 AM ---------- Previous post was at 09:31 AM ----------
got the following error on rebuilding the solution
Quote:
|
Error 1 Unable to find manifest signing certificate in the certificate store. FileSpider
|
__________________
http://img694.imageshack.us/img694/7417/tempmp.jpg
How am I supposed to meet my freetard friends and talk about Linsux now?
|
|
|
29-07-2010, 07:38 PM
|
#16 (permalink)
|
|
XLr8
Join Date: Sep 2008
Posts: 637
|
Re: problem: Front end in C# and backend in C?
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
|
|
|
|
30-07-2010, 09:06 PM
|
#17 (permalink)
|
|
Broken In
Join Date: Oct 2008
Posts: 133
|
Re: problem: Front end in C# and backend in C?
Quote:
Originally Posted by arpanmukherjee1
|
changed the solution settings
__________________
http://img694.imageshack.us/img694/7417/tempmp.jpg
How am I supposed to meet my freetard friends and talk about Linsux now?
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|