473,785 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

invoking C++ functions within C functions

1 New Member
Is there any method by which i can invoke C++ class functions within C functions?
May 18 '07 #1
3 1451
AdrianH
1,251 Recognized Expert Top Contributor
Is there any method by which i can invoke C++ class functions within C functions?
Can you give an example? Is the C function in your C++ project?


Adrian
May 18 '07 #2
weaknessforcats
9,208 Recognized Expert Moderator Expert
Yes, you may call C++ functions from C functions, provided the C++ functions have been labeled extern "C". Otherwise, the C++ function names will be mangled so you will not know the function name to call from C.
May 19 '07 #3
AdrianH
1,251 Recognized Expert Top Contributor
Yes, you may call C++ functions from C functions, provided the C++ functions have been labeled extern "C". Otherwise, the C++ function names will be mangled so you will not know the function name to call from C.
Very true.


Adrian
May 20 '07 #4

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

Similar topics

6
4623
by: Manuel | last post by:
Can I invoke a function before main I could do it by invoking it in a Global object's constructor . Is there any other method other than this. Manuel
6
6181
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at http://groups.google.com/groups?hl=en&lr=&threadm=%23Van7eSrEHA.4004%40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26selm%3D%2523Van7eSrEHA.4004%2540TK2MSFTNGP10.phx.gbl I have concluded that my .NET class library (following the suggestions. namely setting the marshall type, etc.) , I can 1) Invoke public methods...
0
1004
by: FC | last post by:
Hi all: I have created the following function on a MS SQL server 2k, the database name is spjdatabase: ALTER function dbo.jsp (@snum varchar(5), @pnum varchar (5)) returns table as return (select spj.J#,J.CITY,J.JNAME,QTY from spj INNER JOIN j on spj.S# = @snum and spj.P# = @pnum and J.J# = SPJ.J#) I need to invoke this function within C# but I do not have the know how
22
2780
by: ypjofficial | last post by:
Is there any possibility of invoking the member functions of a class without creating an object (or even a pointer to ) of that class. eg. #include <iostream.h> class test { public: void fun() {
0
2019
by: Haxan | last post by:
Hi, I have an unmanaged application that converts a function pointer to a delegate and then pass this as a parameter(delegate) to a managed function which then invokes it. Currently Im able to jump to this unmanaged function, but the values of the parameters inside this function Im seeing are not correct(they have some garbage values). //unmanaged class (C++ application)
14
6027
by: Jess | last post by:
Hello, I learned that there are five kinds of static objects, namely 1. global objects 2. object defined in namespace scope 3. object declared static instead classes 4. objects declared static inside functions (i.e. local static objects) 5. objects declared at file scope.
3
1727
by: Thijs | last post by:
Hello everybody, I´ve got a problem that´s slightly complicated (at least to me it seems) so I will try to state it as clearly as possible. At a certain point in time, I start a second thread that runs one of my functions. The function in this second raises events. As you might know, the eventhandler for this event is executed within this second thread and not within the first. It´s not possible to update properties of a user control...
6
1732
by: Fred | last post by:
Is it legal to invoke my destructor from within an instance function? For example, bool MyClass::someFunction() { SomeOtherClass:someFunction(this); // No other references to 'this' // after this point return true; }
2
5570
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the serialization settings for the build handled the initial slows we encountered when invoking the web service. Since that time, we ported the original VB.net code over to C# - this was done to make it cleaner easier to include the project in the rest of...
0
9645
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
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10155
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9954
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
7502
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
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.