Is it possible to have an ATL project that also contains win32 exported
classes and functions?.
I have a project (module) that needs to export/expose a few ATL objects,
however, other modules depend on the existing exported C++ classes. I
have been adviced that to export the ATL COM object, I should do the ff:
1). Create an ATL project
2). Move the existing code to it
I would like to know if the new project can still export its
classes/functions, so that other dependent code can continue to work? 4 2027
>Is it possible to have an ATL project that also contains win32 exported
>classes and functions?.
If you're asking: can an ATL DLL expose exported functions as well as
its normal COM object(s), the answer is yes.
Dave
"Anonymous" <no******@here. comwrote in message
news:DP******** *************@b t.com...
Is it possible to have an ATL project that also contains win32 exported
classes and functions?.
I have a project (module) that needs to export/expose a few ATL objects,
however, other modules depend on the existing exported C++ classes. I have
been adviced that to export the ATL COM object, I should do the ff:
1). Create an ATL project
2). Move the existing code to it
I would like to know if the new project can still export its
classes/functions, so that other dependent code can continue to work?
You can't export C++ classes (This isn't a restriction of ATL, but a general
issue that Windows has no universal ABI for C++ classes), but if you have
exported functions you can still do so.
"Ben Voigt [C++ MVP]" <rb*@nospam.nos pamwrote in message
news:O9******** ******@TK2MSFTN GP02.phx.gbl...
>
"Anonymous" <no******@here. comwrote in message
news:DP******** *************@b t.com...
>Is it possible to have an ATL project that also contains win32 exported classes and functions?.
I have a project (module) that needs to export/expose a few ATL objects, however, other modules depend on the existing exported C++ classes. I have been adviced that to export the ATL COM object, I should do the ff:
1). Create an ATL project 2). Move the existing code to it
I would like to know if the new project can still export its classes/functions, so that other dependent code can continue to work?
You can't export C++ classes (This isn't a restriction of ATL, but a
general issue that Windows has no universal ABI for C++ classes), but if
you have exported functions you can still do so.
Yes C++ classes can be exported. Albeit not in the since that all
functionality is exposed but it is possible.
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
"Frank Hickman" <fhickman3_NOSP @M_noblesoft.ne twrote in message
news:Oc******** *****@TK2MSFTNG P05.phx.gbl...
"Ben Voigt [C++ MVP]" <rb*@nospam.nos pamwrote in message
news:O9******** ******@TK2MSFTN GP02.phx.gbl...
>> "Anonymous" <no******@here. comwrote in message news:DP******* **************@ bt.com...
>>Is it possible to have an ATL project that also contains win32 exported classes and functions?.
I have a project (module) that needs to export/expose a few ATL objects, however, other modules depend on the existing exported C++ classes. I have been adviced that to export the ATL COM object, I should do the ff:
1). Create an ATL project 2). Move the existing code to it
I would like to know if the new project can still export its classes/functions, so that other dependent code can continue to work?
You can't export C++ classes (This isn't a restriction of ATL, but a general issue that Windows has no universal ABI for C++ classes), but if you have exported functions you can still do so.
Yes C++ classes can be exported. Albeit not in the since that all
functionality is exposed but it is possible.
These things are safe for sharing C++ code:
Source code.
C-compatible exported functions, with a header with appropriate
declarations, and POD structs.
object v-tables, with either a header with pure interface declarations, IDL,
or a COM type library.
For the latter two you must respect memory ownership and always deallocate
in the same module which performed the allocation.
Anything else is highly compiler-specific, non-portable, and almost certain
to cause trouble with a compiler upgrade.
>
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ian |
last post by:
Peace, language lawyers!
I'm developing a (static) library for a "memory-challenged"
platform (ie, mobile).
I want to (force the compiler to) inline some functions -- that
are not meant to be exported to the library's clients.
Example:
|
by: Howard Kaikow |
last post by:
I have files to build a C project, including the makefile, what's the
easiest way to import the project into C and C# in VS .NET Professional? I
have both VS .NET 2002 and 2003.
I have nothing but VB .NET books.
I guess it's time to get a book for each of C++ and C# in .NET.
Any recommendations
--
http://www.standards.com/; See Howard Kaikow's web site.
|
by: Bret Pehrson |
last post by:
I just need to confirm now (after I've spent several days chasing mystery
metadata warnings/errors) that this is *NOT* possible:
Link a managed C++ static library into a (managed) C# application.
NOT POSSIBLE?
Please respond *only* if you *know* the answer, I'm not interested in
conjecture.
|
by: Richard |
last post by:
In VB.NET, I am successfully calling C++ functions and subroutines
that were exported from a DLL. Is it also possible in VB.NET to
directly access a variable that was exported?
Specifically, the DLL has C++ functions and variables that were
exported with __declspec(dllexport). In VB.NET, I can call the
functions after declaring with DllImport. However I haven't figured
out how to access exported variables (not functions or subroutines)....
|
by: Victor |
last post by:
Hi everybody !
I would like to consult a guru for the obstacle I cannot tackle alone.
My environment is Visual Studio 2005 under Windows XP.
I have two projects :
(A) A DLL - HerHair.dll - created in the VC++ by the Wizard. Its header
file HerHair.h has the following content :
| |
by: Amit |
last post by:
how can i call one project function in other project within a single
solution.
plz tell me the solution
|
by: Bmack500 |
last post by:
Okay, this is a pretty basic question. I've created a static library
using c++. Now, I've started a vb.net project. How do I reference the
functions in the static library? I'm using Visual Studio 2005.
I.E., how do I add the library to the project, and call it's functions?
Any help would be greatly appreciated!!!!
|
by: brett.mack |
last post by:
Okay, this is a pretty basic question. I've created a static library
using c++. Now, I've started a vb.net project. How do I reference the
functions in the static library? I'm using Visual Studio 2005.
I.E., how do I add the library to the project, and call it's functions?
Or, do I need to declare if as a .dll? When I do that it won't compile,
giving lnk_2019 errors. I'm using the MFC classes in my c++ app.
|
by: capamaru |
last post by:
hi there
is there a way to get the hole win32 api to xml-rpc method?
i know some functions from win32 api is not possible to be exported
because they return objects
but at least they will give an error.
one way would be with eval() but there is no such function at c++
|
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...
|
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...
| |
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...
|
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,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |