473,808 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can i make use of vc++ functions from c# applications??

13 New Member
wat r these c# wrappers?
how can it play in and around c++ dlls
plese help me out
Oct 11 '07 #1
10 1406
Plater
7,872 Recognized Expert Expert
What do you mean "C# wrappers" and wrappers for what?
Please try to form complete and logical sentances.
Oct 11 '07 #2
sandy111
13 New Member
wat r these c# wrappers?
wat i want to do is ,
.NET components hav to talk with an application which is in vc++
for which i need this .
can u help me out
Oct 11 '07 #3
Plater
7,872 Recognized Expert Expert
Well that wasn't much better, but I think you will want to look up:

DllImport


And also maybe:

PInvoke
Oct 11 '07 #4
sandy111
13 New Member
u mean to say making use of those directives in c# application???
Oct 12 '07 #5
sandy111
13 New Member
how can i make use of vc++ functions in c# applictions?
how to achieve this?
does wrappers r required?
i hav vc++ dlls . how to use it in c# applications.
if wrappers r required ??? if so wat r these??
plz let me know
Oct 12 '07 #6
jeyara
2 New Member
wat r these c# wrappers?
wat i want to do is ,
.NET components hav to talk with an application which is in vc++
for which i need this .
can u help me out
Wrappers are static classes, where we used to do all the legacy(basicall y unmanaged resources) calls using dllimport. this is best practice, since we keep all the legay dll call in a single place. So maintenance or modification on calling dll's will be easy. for the .net application, it will be shown as a managed class, which provides some services.

Try to find out the dll's method signature that you want to call. then try to call using marshaling. dll import is a key word used to import the dll. marshaling is the communication method we used to talk with dll & .net app.

do some googling on dll import. there are lot of resources available.
Oct 12 '07 #7
sandy111
13 New Member
I have a requirement to use a dll written in VC++ in my C# application.
how to achieve this?
Oct 12 '07 #8
DblQt
1 New Member
If it is simple, i.e. pure function calls etc., you can get away with pinvoke calls:

http://msdn2.microsoft .com/en-us/library/Aa288468(VS.71) .aspx

If it is more complex you might want to write a C++/Cli wrapper around I currently don't have a good link at hand, just google c++/cli.
Oct 12 '07 #9
KnightHack
15 New Member
In C# application right click on Addreffrence
It will load one window there browse that DLL and show there path it will load

in your code
Using Dll application Name


create instance and use it ,

Its very simple.
Oct 12 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4208
by: Leonid | last post by:
Hello, Please help me to resolve next problem: I have Web service installed on the network and I can communicate with it via WSDL file from several applications including VC++6 application using SOAP Toolkit 2. After that I installed VC++ .NET 2003 and tried to generate proxy class using 'Add Web Reference .' menu (SProxy.exe). This wizard just failed to generate right proxy class because it always returns S_OK error code, but can't...
1
2595
by: Bob | last post by:
I would appreciate any suggestions on handling the following... I currently have a VC++ MDI Application. The core pieces/products are all handled in separate dll's. Our shop has slowly been rewriting other applications over to VB.net. My application has now been targeted with coming over, but management does not want to incur a rewrite timeline. Since we have a standard vb.net framework in place, their thoughts are to try and take the...
26
1967
by: _R | last post by:
Given that VS2005 has made an effort to clean up the syntax of VC++ (in C++/CLI), is there any future plans to do away with function protos, ala C#/VB? What are they needed for these days?
8
2325
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR types. The problem: I have a number of mixed-mode functions which I want reuse. These functions revolve around converting a CLR String to a C++ std::string or
14
2145
by: John | last post by:
My friend told me that his company will migrate the VC++ win32 applications to C++ .NET windows applications. I don't understand why since currently Microsoft only supports .NET on windows platforms. If Win32 applications and .NET application both will run on windows only, what's the advantages for the migration? Or maybe this type of migration is not common in practice?
17
7259
by: Fabry | last post by:
Hi All, I'm new of this group and I do not know if this is the correct group for my question. I have a DLL with its export library (.lib) wrote in Borland C++ 6. In borland everything is OK and I am able to include the lib and use the class that i have exported creating an instance with new etc... I would like to export this class in microsoft VC++ using the same .lib file. Obviously it doesn' t work.
1
1198
by: sandy111 | last post by:
here i hav a vc++ dll with some functions defined so that i can import from other applications. how can i import the same functions of vc++ in my c# applications so that i can use those functions in c#. i cant add refereces for my c# applications because the dll is in vc++. how can i achieve this. when i add refereces it says like .................. Could not load file or assembly 'file:abc.dll' or one of its dependencies. The module...
53
2373
by: Edward Diener | last post by:
Why bother having Stan Lippman and Herb Sutter created a C++/CLI language for .Net development when Microsoft, and the VC++ development team, are so clearly intent on limiting .Net development with C++/CLI to the smallest subset of .Net development technologies in Visual Studio, while all of the new technologies are given to C# instead ? The bubble has burst with VS 2008 and we are instead finally told quite frankly, by a lead VC++ team...
7
1627
by: Ashutosh Bhawasinka | last post by:
Hi, I have a C# .Net application which needs to use some feature which can be only developed in Visual C++ (its extended MAPI). The C# exe will be supplied to users without a setup. What kind of exe/dll should I develop in Visual C++ so that I can meet these requirements 1) No administrator rights are required
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10628
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.