I am investigating the different ways in which one can call C functions from
inside a C# project. In particular, I need to do this in such a way as to
preserve the ability to debug the C code. It is difficult to debug a DLL,
so I'm trying to find a different approach from importing a DLL.
Ideally, I would like to be able to just include the C code in the C#
project. Does anyone have any ideas? I am using Visual Studio.NET.
Thanks,
Joey 6 2124
Debug the DLL seperately then use it
"Joey Harrison" <Jo**@AutonomousSolutions.com> wrote in message
news:u7**************@TK2MSFTNGP11.phx.gbl... I am investigating the different ways in which one can call C functions
from inside a C# project. In particular, I need to do this in such a way as to preserve the ability to debug the C code. It is difficult to debug a DLL, so I'm trying to find a different approach from importing a DLL.
Ideally, I would like to be able to just include the C code in the C# project. Does anyone have any ideas? I am using Visual Studio.NET.
Thanks, Joey
you could use a Managed C++ project, that'll let you mix C and Managed C++
in a "mixed mode DLL" there are a couple of pitfalls though: static types
cant be initialized properly unless you build a few workarounds but other
than that its all good.
obviously PInvoke is used to call into C/C++ functions imported from native
DLLs
--
Eric Newton
C#/ASP Application Developer http://ensoft-software.com/ er**@cc.ensoft-software.com [remove the first "CC."]
"Joey Harrison" <Jo**@AutonomousSolutions.com> wrote in message
news:u7**************@TK2MSFTNGP11.phx.gbl... I am investigating the different ways in which one can call C functions
from inside a C# project. In particular, I need to do this in such a way as to preserve the ability to debug the C code. It is difficult to debug a DLL, so I'm trying to find a different approach from importing a DLL.
Ideally, I would like to be able to just include the C code in the C# project. Does anyone have any ideas? I am using Visual Studio.NET.
Thanks, Joey
Joey, I am investigating the different ways in which one can call C functions from inside a C# project. In particular, I need to do this in such a way as to preserve the ability to debug the C code. It is difficult to debug a DLL, so I'm trying to find a different approach from importing a DLL.
If you enable the "Enable Unmanaged Debugging" option in the project
properties, you should be able to step into the C code.
Ideally, I would like to be able to just include the C code in the C# project. Does anyone have any ideas?
That wont work, you can only have C# source code in a C# project.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Arnt they redoing the C++/CLI syntax to avoid all this __blah keyword mess?
"Eric Newton" <er**@cc.ensoft-software.com> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl... you could use a Managed C++ project, that'll let you mix C and Managed C++ in a "mixed mode DLL" there are a couple of pitfalls though: static types cant be initialized properly unless you build a few workarounds but other than that its all good.
obviously PInvoke is used to call into C/C++ functions imported from
native DLLs
-- Eric Newton C#/ASP Application Developer http://ensoft-software.com/ er**@cc.ensoft-software.com [remove the first "CC."]
"Joey Harrison" <Jo**@AutonomousSolutions.com> wrote in message news:u7**************@TK2MSFTNGP11.phx.gbl... I am investigating the different ways in which one can call C functions from inside a C# project. In particular, I need to do this in such a way as
to preserve the ability to debug the C code. It is difficult to debug a
DLL, so I'm trying to find a different approach from importing a DLL.
Ideally, I would like to be able to just include the C code in the C# project. Does anyone have any ideas? I am using Visual Studio.NET.
Thanks, Joey
<di********@discussion.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Arnt they redoing the C++/CLI syntax to avoid all this __blah keyword
mess?
Yes, with talk of standardizing it with the ECMA, although I don't know the
state of it(I can't find the prelim spec on the ECMA site anymore, saw it
there some months back however) "Eric Newton" <er**@cc.ensoft-software.com> wrote in message news:OE**************@TK2MSFTNGP11.phx.gbl... you could use a Managed C++ project, that'll let you mix C and Managed
C++ in a "mixed mode DLL" there are a couple of pitfalls though: static
types cant be initialized properly unless you build a few workarounds but
other than that its all good.
obviously PInvoke is used to call into C/C++ functions imported from native DLLs
-- Eric Newton C#/ASP Application Developer http://ensoft-software.com/ er**@cc.ensoft-software.com [remove the first "CC."]
"Joey Harrison" <Jo**@AutonomousSolutions.com> wrote in message news:u7**************@TK2MSFTNGP11.phx.gbl... I am investigating the different ways in which one can call C
functions from inside a C# project. In particular, I need to do this in such a way
as to preserve the ability to debug the C code. It is difficult to debug a DLL, so I'm trying to find a different approach from importing a DLL.
Ideally, I would like to be able to just include the C code in the C# project. Does anyone have any ideas? I am using Visual Studio.NET.
Thanks, Joey
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chris |
last post by:
Hi
I have a scenario where I've created another AppDomain to dynamically load a DLL(s) into. In this newly loaded DLL I want to call a static method on a class. The problem arise is that I have...
|
by: Muthu |
last post by:
I've read calling conventions to be the order(reverse or forward) in
which the parameters are being read & understood by compilers.
For ex. the following function.
int Add(int p1, int p2, int...
|
by: Klaus Friese |
last post by:
Hi,
i'm currently working on a plugin for Adobe InDesign and i have some
problems with that. I'm not really a c++ guru, maybe somebody here has
an idea how to solve this.
The plugin is...
|
by: Bryan |
last post by:
I have a multi-threaded C# console application that uses WMI
(System.Management namespace) to make RPC calls to several servers (600+ )
and returns ScheduledJobs. The section of my code that...
|
by: Jesse McGrew |
last post by:
Hi all,
I'm trying to make a plugin DLL for a third-party application, using
VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of
the application, and my actual plugin code...
|
by: Nick Flandry |
last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my
development environment (Win2K server running IIS 5) and a test environment (also Win2K server
running IIS...
|
by: desmcc |
last post by:
Hi,
I am launching a modal dialog through the usual javascript
(window.showmodaldialog). When the modal dialog is complete (ie user
selects OK), the calling page then refreshes itself by setting...
|
by: Mike |
last post by:
Timeout Calling Web Service
I am calling a .NET 1.1 web service from an aspx page. The web service can
take several minutes to complete its tasks before returning a message to the
aspx page.
...
|
by: teju |
last post by:
hi,
i am trying 2 merge 2 projects into one project.One project is using c
language and the other one is using c++ code.
both are working very fine independently.But now i need to merge both...
|
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= |
last post by:
I have a C# logging assembly with a static constructor and methods that is
called from another C# Assembly that is used as a COM interface for a VB6
Application. Ideally I need to build a file...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |