473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Integrate C code with C#

Hello, All
I am new to improving user interface. I have some questions for all the experts here who could help me out in this aspect.

Now, I am in the early stage of developing a new user inteface for a computation intensive application program which has a character-based user interface now. The original program was written in C. For the new graphical interface, I am thinking of using C#. But I am not sure whether it is feasible or too tedious to integrate all the functions written in C with the new interface that will be written in C#.

Is C# the right choice? Or another language will be a better idea to develop a new graphical user interface

Thanks a lot in advance for any help on the subject

Alison
Nov 16 '05 #1
4 2931
Alison,

C# would be as good a .NET language as any other. The functionality is
in the System.Windows.Forms assembly, and its object model, not in the C#
language itself. That being said, you could use any .NET language you
wished.

As for accessing the functionality in the C code, if your code exposes
the functions that are exported through DLLs, then you should be able to
access those functions though the P/Invoke layer.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alison" <an*******@discussions.microsoft.com> wrote in message
news:EA**********************************@microsof t.com...
Hello, All,
I am new to improving user interface. I have some questions for all the experts here who could help me out in this aspect.
Now, I am in the early stage of developing a new user inteface for a computation intensive application program which has a character-based user
interface now. The original program was written in C. For the new graphical
interface, I am thinking of using C#. But I am not sure whether it is
feasible or too tedious to integrate all the functions written in C with the
new interface that will be written in C#.
Is C# the right choice? Or another language will be a better idea to develop a new graphical user interface?
Thanks a lot in advance for any help on the subject.

Alison

Nov 16 '05 #2
It seems to me another option could be if he actually has the c code for
this project to compile it as a .NET assembly. This will make it easier to
use in his project. In addition to making it easier it will probably cut
down on the overhead that is incured when switching between managed and
unmanaged code.The only problem that comes up is that the c code might then
run slower so some testing is going to need to be done to see if the
overhead from switching between managed and unmanaged code is more than the
performance decrease by making it managed c/c++. After reading some sutff by
the managed directx team and watching an interview with the chief architect
it seems that the hit from going over com or dll boundries was more than
they were willing to accept. It all depends on how critical your application
is.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Od**************@TK2MSFTNGP11.phx.gbl...
Alison,

C# would be as good a .NET language as any other. The functionality is in the System.Windows.Forms assembly, and its object model, not in the C#
language itself. That being said, you could use any .NET language you
wished.

As for accessing the functionality in the C code, if your code exposes
the functions that are exported through DLLs, then you should be able to
access those functions though the P/Invoke layer.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alison" <an*******@discussions.microsoft.com> wrote in message
news:EA**********************************@microsof t.com...
Hello, All,
I am new to improving user interface. I have some questions for all the experts here who could help me out in this aspect.

Now, I am in the early stage of developing a new user inteface for a

computation intensive application program which has a character-based user
interface now. The original program was written in C. For the new

graphical interface, I am thinking of using C#. But I am not sure whether it is
feasible or too tedious to integrate all the functions written in C with the new interface that will be written in C#.

Is C# the right choice? Or another language will be a better idea to

develop a new graphical user interface?

Thanks a lot in advance for any help on the subject.

Alison


Nov 16 '05 #3
Nicholas
Thanks a lot for your reply. You did give me some hints on how to carry on the project
Have a great day
Aliso

----- Nicholas Paldino [.NET/C# MVP] wrote: ----

Alison

C# would be as good a .NET language as any other. The functionality i
in the System.Windows.Forms assembly, and its object model, not in the C
language itself. That being said, you could use any .NET language yo
wished

As for accessing the functionality in the C code, if your code expose
the functions that are exported through DLLs, then you should be able t
access those functions though the P/Invoke layer

Hope this helps
--
- Nicholas Paldino [.NET/C# MVP
- mv*@spam.guard.caspershouse.co

"Alison" <an*******@discussions.microsoft.com> wrote in messag
news:EA**********************************@microsof t.com..
Hello, All
I am new to improving user interface. I have some questions for all th

experts here who could help me out in this aspect
Now, I am in the early stage of developing a new user inteface for computation intensive application program which has a character-based use
interface now. The original program was written in C. For the new graphica
interface, I am thinking of using C#. But I am not sure whether it i
feasible or too tedious to integrate all the functions written in C with th
new interface that will be written in C# Is C# the right choice? Or another language will be a better idea t develop a new graphical user interface Thanks a lot in advance for any help on the subject
Aliso


Nov 16 '05 #4
Dave
I do have the C source code. You pointed out something I am also concerned about. I should not compromise too much the speed of the computational power of the original program. The ideal situation is to develop a much user-friendly graphical interface without affecting much of the functionality of the application program itself. Since I have no previous experience in doing this kind of project, I am kind of at loss about how to set up the bridge between the new interface and the original program

Thanks a lot for your idea

Aliso

----- Dave Quigley wrote: ----

It seems to me another option could be if he actually has the c code fo
this project to compile it as a .NET assembly. This will make it easier t
use in his project. In addition to making it easier it will probably cu
down on the overhead that is incured when switching between managed an
unmanaged code.The only problem that comes up is that the c code might the
run slower so some testing is going to need to be done to see if th
overhead from switching between managed and unmanaged code is more than th
performance decrease by making it managed c/c++. After reading some sutff b
the managed directx team and watching an interview with the chief architec
it seems that the hit from going over com or dll boundries was more tha
they were willing to accept. It all depends on how critical your applicatio
is

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote i
message news:Od**************@TK2MSFTNGP11.phx.gbl..
Alison
C# would be as good a .NET language as any other. The functionalit i
in the System.Windows.Forms assembly, and its object model, not in the C
language itself. That being said, you could use any .NET language yo
wished
As for accessing the functionality in the C code, if your code expose the functions that are exported through DLLs, then you should be able t
access those functions though the P/Invoke layer
Hope this helps
--

- Nicholas Paldino [.NET/C# MVP
- mv*@spam.guard.caspershouse.co
"Alison" <an*******@discussions.microsoft.com> wrote in messag

news:EA**********************************@microsof t.com..
Hello, All
I am new to improving user interface. I have some questions for all th

experts here who could help me out in this aspect Now, I am in the early stage of developing a new user inteface for computation intensive application program which has a character-based use
interface now. The original program was written in C. For the ne

graphica interface, I am thinking of using C#. But I am not sure whether it i
feasible or too tedious to integrate all the functions written in C wit th new interface that will be written in C# Is C# the right choice? Or another language will be a better idea t develop a new graphical user interface Thanks a lot in advance for any help on the subject
Aliso

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: Swartz | last post by:
Hi all. I'm working here on a small project of mine. I'm not new to programming, but I'm new to PHP. You have to understand that I'm coming from C++, OOP world, so my code might seems a little...
0
by: Rob R. Ainscough | last post by:
I'm looking for some Knowledge base tools that would integrate into VS.2003 and be flexible. My developers would us it to house important tips, tricks, and other information -- needs to have...
3
by: Tom Kaz | last post by:
I need to compute integral of some array function, something like: from scipy import * f = lambda x: array( ) integrate.quad(f, 0, 1) Unfortunately integrate.quad requires Float type.
5
by: Marcelo | last post by:
How can I integrate c++ programs inside a GUI java interface? I would like to get the results from a c++ program and integrate them inside a java GUI. thanks Marcelo
1
by: Johnny Meredith | last post by:
Dear All, I have an Access database that tracks the progress of income tax audits. When the taxing authorities make a change (an "Adjustment"), I record the pertinent information in the...
0
by: P McGinness | last post by:
Basically, I've a JS function called ValidateForm(), which returns true or false and controls if the form submits. When I integrate this with .NET validators, the .NET always adds it's own call...
1
by: Kiran | last post by:
Hi, I have my reports at http:\\localhost\ReportServer and need to use them in ASP.NET Web Form.I have a few questions reg. this ------> I want to generate a PDF when a button labeled...
2
by: pdmountaineer | last post by:
hi, I am writing a C program and I would like to integrate some executables (.EXE files) from my C program. Is this possible and how should one do this exactly? kind regards
5
by: najmi | last post by:
hai.. i hava use FullCalendar in my application.i try to reload event into the calendar but it doesn`t work.here is my code <%@ page import="java.util.HashMap;" %> <%@ page...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.