Link to home
Start Free TrialLog in
Avatar of tsvenkat
tsvenkat

asked on

ATL COM on NT/95....

Hi,
I've developed a simple COM object with
ATL Object wizard (using VC++ 6.0).
I've build it in the Release -MinSize
configuration.
My development machine is winNT.
The COM server works fine in any NT
machine - but the application aborts
when run on a 95 machine.
(The registeration of the COM server on
the 95 machines goes thro' fine)
What is the exact method to be followed
when developing a ATL COM object that is
targeted for both NT and 95 pltaforms ?
Any suggestion would be of good help.

Thanks and Regards
~,|,~
tsV

ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tsvenkat
tsvenkat

ASKER

Hi Chensu,
I fixed the problem.
It was specific to the MFC client that
uses the com server.
I've made an AfxSocketInit() call from
the client. Also I've done the same in
the COM server.
This second call caused to fail when the
com server is loaded.
I removed the sock init call from the
client and the application ran just fine !!

But one question.
Is there a standard way to find out if the socket library is already initialized ? - so that I can accordingly make init call to the socket library.

Also, is there any installation utility
that allows me to check for the target
platform and selectively copy the
win95/winNT version of the ATL.DLL
file ?

Anyhow, as my problem is fixed, I'm glad
to give you the said points.

Thanks and Regards
~,|,~
tsV
>Is there a standard way to find out if the socket library is already initialized ?

When a socket function fails, call CAsyncSocket::GetLastError to see if the error is WSANOTINITIALISED.

>is there any installation utility
that allows me to check for the target
platform and selectively copy the
win95/winNT version of the ATL.DLL
file ?

To check the OS, call GetVersionEx. But there is only one ATL.DLL for both Windows 9x and NT.