Mohit Kumar
What do you mean by "ATL DLL" ?
Is it a COM DLL written using ATL?
Is it a pure Win32 DLL with a C or C++ interface that uses some of ATL
classes (like CString) inside?
Note that there is a specific group to discuss ATL: microsoft.public.vc.atl.
Giovanni
Tom
<behapp...@gmail.com> wrote in message
news:52567592-bf97-45c3...@d25g2000prn.googlegroups.com...
If it is an ATL COM DLL then you can use #import to import the TLB/DLL and
generate wrapper classes for the COM object. If it is just a normal DLL
using ATL functionality then you can either link to the .lib file, or load
it at runtime using LoadLibrary/GetProcAddress.
You can tell if it is a COM DLL by looking for the exported function
DllRegisterServer.
You can use ATL with MFC at compile time and also at run time (COM)?
It all depends upon what you are doing.
--
Ajay
Hi,
I had created an ATL COM Dll using using Web service proxy wizard
(http://msdn.microsoft.com/en-us/library/aa239611(VS.60).aspx)
I have to use output dll in my c++ project .
Please help
Mohit Kumar
> I had created an ATL COM Dll using using Web service proxy wizard
> (http://msdn.microsoft.com/en-us/library/aa239611(VS.60).aspx)
> I have to use output dll in my c++ project .
> Please help
My understanding is that your ATL COM DLL is just a simple COM Server (no
ActiveX, right?).
In that case, you can use it from C++ with code like this:
<code>
// Result of COM operations
HRESULT hr;
// COM interface to call the services offered by the ATL component
IYourATLComponent * pATLComponent = NULL;
// Initialize COM
hr = CoInitialize(NULL);
if (FAILED(hr))
... error
// Create an instance of the component
hr = CoCreateInstance(
CLSID_YourATLComponent,
NULL,
CLSCTX_INPROC_SERVER,
IID_IYourATLComponent,
(void**) &pATLComponent
);
if ( SUCCEEDED(hr) )
{
... call component methods using returned COM interface
hr = pATLComponent->DoSomething(...);
}
// Cleanup COM
CoUninitialize();
</code>
HTH,
Giovanni
Your ATL module is simply another COM server so all you need is an
COM client with or without ATL. There are tons of examples at codeguru/
codeproject to do this.
I dont know if your web service was written in .Net. If it is, you
dont need to wrap it with ATL proxy dll. You can use managed code in C+
+ and avoid all the COM stuff.
--
Ajay