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



## siddharthmakwana (Jul 14, 2010)

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 (Jul 14, 2010)

siddharthmakwana said:


> 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 (Jul 14, 2010)

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.


----------



## MetalheadGautham (Jul 14, 2010)

Garbage said:


> 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 (Jul 14, 2010)

MetalheadGautham said:


> 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 (Jul 15, 2010)

MetalheadGautham said:


> 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


----------



## arpanmukherjee1 (Jul 16, 2010)

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 (Jul 18, 2010)

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...


----------



## arpanmukherjee1 (Jul 18, 2010)

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


----------



## siddharthmakwana (Jul 19, 2010)

arpanmukherjee1 said:


> i developed a form applic in C# for finding duplicate files using md5 Hash.
> 
> used the md5 security class
> 
> ...






i think CRC32 is enough for this purpose.....


----------



## Garbage (Jul 19, 2010)

arpanmukherjee1 said:


> 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 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.


----------



## arpanmukherjee1 (Jul 27, 2010)

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


----------



## arpanmukherjee1 (Jul 28, 2010)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
anybody dwnloaded it yet


----------



## Garbage (Jul 28, 2010)

Will download and try tonight. Have to boot into Windows. :S


----------



## lucifer_is_back (Jul 29, 2010)

arpanmukherjee1 said:


> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 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 


> Error    1    Unable to find manifest signing certificate in the certificate store.    FileSpider


----------



## arpanmukherjee1 (Jul 29, 2010)

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 (Jul 30, 2010)

arpanmukherjee1 said:


> my bad... sorry ::: delete all files from ./Filespider/bin  & Debug folder
> 
> if that dont work consult
> 
> ...


changed the solution settings


----------

