problem: Front end in C# and backend in C?

siddharthmakwana

Broken In
Joined
Oct 21, 2008
Messages
62
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...
 

lucifer_is_back

Journeyman
Joined
Oct 17, 2008
Messages
123
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#
 

Garbage

God of Mistakes...
Joined
Dec 26, 2005
Messages
1,896
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.
 
Joined
Sep 7, 2007
Messages
7,557
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 ?
 

Garbage

God of Mistakes...
Joined
Dec 26, 2005
Messages
1,896
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
:)
 

lucifer_is_back

Journeyman
Joined
Oct 17, 2008
Messages
123
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
 
Joined
Sep 24, 2008
Messages
624
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 ----------

lucifer_is_back;1262221 create the C code as a DLL project and use it in C# project [/QUOTE said:
this is what i think is the best method for using c codes in other langs.
 

Garbage

God of Mistakes...
Joined
Dec 26, 2005
Messages
1,896
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... :p
 
Joined
Sep 24, 2008
Messages
624
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
 
OP
siddharthmakwana

siddharthmakwana

Broken In
Joined
Oct 21, 2008
Messages
62
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.....:idea:
 

Garbage

God of Mistakes...
Joined
Dec 26, 2005
Messages
1,896
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.
 
Joined
Sep 24, 2008
Messages
624
now here is my code :: RS :: report if links broken

Setup::
RapidShare: 1-CLICK Web hosting - Easy Filehosting
MD5: 2B439A7732BE0B5E61BED21EBB033FDD


solution::
RapidShare: 1-CLICK Web hosting - Easy Filehosting
MD5: 462A1D05BCBEB912F9319674D5E28561

:bananana:
 

Garbage

God of Mistakes...
Joined
Dec 26, 2005
Messages
1,896
Will download and try tonight. Have to boot into Windows. :S
 
Joined
Sep 24, 2008
Messages
624
my bad... sorry ::: delete all files from ./Filespider/bin & Debug folder

if that dont work consult

Unable to find manifest signing certificate in the certificate store. (MSB3323) - SharpDevelop Community

& this

error MSB3323: Unable to find manifest signing certificate in the certificate store.
 

lucifer_is_back

Journeyman
Joined
Oct 17, 2008
Messages
123
my bad... sorry ::: delete all files from ./Filespider/bin & Debug folder

if that dont work consult

Unable to find manifest signing certificate in the certificate store. (MSB3323) - SharpDevelop Community

& this

error MSB3323: Unable to find manifest signing certificate in the certificate store.
changed the solution settings :D
 
Top