cypriotpryde
March 19th, 2008, 10:44 AM
Hello all.
I I've been tasked with quite an interesting project right now, but I honestly don't even know where to start. I really need some input from some experienced .net developers.
The project I was assigned, was that I have to take a certain module of a project written in C for an embedded system, have it compile in a Windows environment, by itself (using some helper files to provide support for any calls to other modules), and create a C# Windows application that can be used to provide input to the C module, and observe its state and outputs afterwards (the module is a state machine).
Now, where I am right now, is that I've decided to use Visual C++ Express to create a project for the C code that I already have, and compile it using the Visual Studio C Compiler, so I shouldn't have a problem there, and I will be using Visual C# Express to create the windows application.
The question I have is, how would I call the necessary C functions in the C# project?
I am an experienced C# and C programmer, but I've never created any sort of project with outside dependencies and calls like this, especially in 2 different languages, so any input on the matter would be helpful. From a little prliminary research on the subject, I've seen that some people use DLLs or the PInvoke method, but I am unaware on how to use either, or if either will even be useful to my needs.
Once again, any input would be greatly appreciated. Thanks.
I I've been tasked with quite an interesting project right now, but I honestly don't even know where to start. I really need some input from some experienced .net developers.
The project I was assigned, was that I have to take a certain module of a project written in C for an embedded system, have it compile in a Windows environment, by itself (using some helper files to provide support for any calls to other modules), and create a C# Windows application that can be used to provide input to the C module, and observe its state and outputs afterwards (the module is a state machine).
Now, where I am right now, is that I've decided to use Visual C++ Express to create a project for the C code that I already have, and compile it using the Visual Studio C Compiler, so I shouldn't have a problem there, and I will be using Visual C# Express to create the windows application.
The question I have is, how would I call the necessary C functions in the C# project?
I am an experienced C# and C programmer, but I've never created any sort of project with outside dependencies and calls like this, especially in 2 different languages, so any input on the matter would be helpful. From a little prliminary research on the subject, I've seen that some people use DLLs or the PInvoke method, but I am unaware on how to use either, or if either will even be useful to my needs.
Once again, any input would be greatly appreciated. Thanks.