G00fy
asked on
ATL COM dll which exports symbols
You can create an ATL COM-dll, this dll has a typelibrary to access the internal functions.
You can also create a DLL which exports some symbols.
But now, I want to create an ATL-COM DLL which exports some functions and structs:
//code//
; DPD_Dll.def : Declares the module parameters.
LIBRARY "Dll.DLL"
EXPORTS
DllCanUnloadNow @1 PRIVATE
DllGetClassObject @2 PRIVATE
DllRegisterServer @3 PRIVATE
DllUnregisterServer @4 PRIVATE
\\code\\
That's from an ATL com DLL...
But now I want to export the struct 'route' and the function 'findroute' and the object (class) 'CMaptool'
How can I do this?
You can also create a DLL which exports some symbols.
But now, I want to create an ATL-COM DLL which exports some functions and structs:
//code//
; DPD_Dll.def : Declares the module parameters.
LIBRARY "Dll.DLL"
EXPORTS
DllCanUnloadNow @1 PRIVATE
DllGetClassObject @2 PRIVATE
DllRegisterServer @3 PRIVATE
DllUnregisterServer @4 PRIVATE
\\code\\
That's from an ATL com DLL...
But now I want to export the struct 'route' and the function 'findroute' and the object (class) 'CMaptool'
How can I do this?
ASKER
No, I just want the Dll to be used OR by accessing it via IDL, or via default windows API's...
If they (the people who use it) want to mix them... I don't care... The IDL frontend has all the objects and functions and structs and such. So it's nearly done.
But now I want to include the API-frontend.
Another question came to my head:
when I access the dll via API, how is the load/unloading done? Is it loaded before every api-call, and unloaded after each api-call? Or stays it resident in memory? Or does it get a ReferenceCounter (like with COM-elements) that when it hits 0, it is unloaded?
If they (the people who use it) want to mix them... I don't care... The IDL frontend has all the objects and functions and structs and such. So it's nearly done.
But now I want to include the API-frontend.
Another question came to my head:
when I access the dll via API, how is the load/unloading done? Is it loaded before every api-call, and unloaded after each api-call? Or stays it resident in memory? Or does it get a ReferenceCounter (like with COM-elements) that when it hits 0, it is unloaded?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
G00fy,
Does that help you?
-- Dan
Does that help you?
-- Dan
ASKER
I have not tried it yet... I will update this question as soon as I start with this... In the meantime ;) you might be able to answer the other question I'm going to ask in a minute on this very same site.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Split: _ys_ {http:#9716177} & DanRollins {http:#9763089}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Tinchos
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Split: _ys_ {http:#9716177} & DanRollins {http:#9763089}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Tinchos
EE Cleanup Volunteer
COM dynamically loads/unloads dlls as it uses them. As such your dll could be unloaded when a client has a handle on your exported struct or class - which would not be good.
If you really must, your struct can be defined purely in IDL, allowing it to be redistributed as part of the type library.