Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 14-07-2010, 11:44 AM   #1 (permalink)
Apprentice
 
siddharthmakwana's Avatar
 
Join Date: Oct 2008
Location: Baroda
Posts: 62
Default 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..!!
siddharthmakwana is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 14-07-2010, 07:44 PM   #2 (permalink)
Broken In
 
Join Date: Oct 2008
Posts: 133
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by siddharthmakwana View Post
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?
lucifer_is_back is offline   Reply With Quote
Old 14-07-2010, 07:55 PM   #3 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default 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.
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 14-07-2010, 11:23 PM   #4 (permalink)
The Smaller Bang
 
MetalheadGautham's Avatar
 
Join Date: Sep 2007
Location: Gautham City
Posts: 7,489
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by Garbage View Post
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
MetalheadGautham is offline   Reply With Quote
Old 14-07-2010, 11:41 PM   #5 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by MetalheadGautham View Post
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
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 15-07-2010, 03:13 AM   #6 (permalink)
Broken In
 
Join Date: Oct 2008
Posts: 133
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by MetalheadGautham View Post
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?
lucifer_is_back is offline   Reply With Quote
Old 16-07-2010, 02:00 PM   #7 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default 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.
arpanmukherjee1 is offline   Reply With Quote
Old 18-07-2010, 11:00 AM   #8 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default 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...
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 18-07-2010, 06:38 PM   #9 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default 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.
arpanmukherjee1 is offline   Reply With Quote
Old 19-07-2010, 12:57 AM   #10 (permalink)
Apprentice
 
siddharthmakwana's Avatar
 
Join Date: Oct 2008
Location: Baroda
Posts: 62
Thumbs up Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by arpanmukherjee1 View Post
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..!!
siddharthmakwana is offline   Reply With Quote
Old 19-07-2010, 02:49 PM   #11 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by arpanmukherjee1 View Post
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.
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 27-07-2010, 10:17 AM   #12 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: problem: Front end in C# and backend in C?

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

__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Old 28-07-2010, 09:37 AM   #13 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default 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.
arpanmukherjee1 is offline   Reply With Quote
Old 28-07-2010, 08:35 PM   #14 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: problem: Front end in C# and backend in C?

Will download and try tonight. Have to boot into Windows. :S
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 29-07-2010, 09:38 AM   #15 (permalink)
Broken In
 
Join Date: Oct 2008
Posts: 133
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by arpanmukherjee1 View Post


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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?
lucifer_is_back is offline   Reply With Quote
Old 29-07-2010, 07:38 PM   #16 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: problem: Front end in C# and backend in C?

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.
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Old 30-07-2010, 09:06 PM   #17 (permalink)
Broken In
 
Join Date: Oct 2008
Posts: 133
Default Re: problem: Front end in C# and backend in C?

Quote:
Originally Posted by arpanmukherjee1 View Post
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?
lucifer_is_back is offline   Reply With Quote
Reply

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2