473,406 Members | 2,356 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,406 software developers and data experts.

Using C Classes with C# in Visual Studio

Once, a long time ago in a galaxy far far away, I used to write C (very small-time, but I did). Anyway, now I've been learning C# in Visual Studio, and I need to access a C API from C#. Can this be done? How?

I've searched the Archives, but it's almost impossible to do a search that comes up with anything like the right results, so I'm just posting the question.

Any help would be greatly appreciated.
--------------------------------
From: Tom Bolton

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>M/1IkRsCmUieBki7l0Pe9Q==</Id>
Nov 16 '05 #1
1 999
If your C API has been exported to a dll, you could use PInvoke to get
access to it. Another option would be make a managed wrapper of your module
using C++ managed extensions (MC++) and then use this in any .net module.

--
Ajay Kalra [MVP - VC++]
aj*******@yahoo.com
"Tom Bolton via .NET 247" <an*******@dotnet247.com> wrote in message
news:O5**************@TK2MSFTNGP14.phx.gbl...
Once, a long time ago in a galaxy far far away, I used to write C (very small-time, but I did). Anyway, now I've been learning C# in Visual Studio,
and I need to access a C API from C#. Can this be done? How?
I've searched the Archives, but it's almost impossible to do a search that comes up with anything like the right results, so I'm just posting the
question.
Any help would be greatly appreciated.
--------------------------------
From: Tom Bolton

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>M/1IkRsCmUieBki7l0Pe9Q==</Id>

Nov 16 '05 #2

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

Similar topics

2
by: Guy | last post by:
Everytime I try to add a new class or form to .NET C# project, I get the following error Could not run the 'C:\Program Files\Microsoft Visual Studio .NET...
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
3
by: Andreas | last post by:
Hi! I'm currently developing a DLL that makes use of C++ and .net (mixed) using Visual Studio 2003. Now, as I wanted to move to the new Visual Studio 2005, I converted this project into the...
9
by: Fat Elvis | last post by:
I'd like to extend some of my Asp.net pages by using Partial Classes. Example ASP.Net Page: public partial class Admin_Customer : System.Web.UI.Page { protected void Page_Load(object sender,...
2
by: zethon | last post by:
Hello, I have a webservice file (service.asmx), inside which I make reference to several classes that reside in a .NET Class Library (classes.dll). When I run the webservice through Visual...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.