[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

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

0
tsvenkat
Asked:
tsvenkat
  • 2
1 Solution
 
chensuCommented:
Using MinSize configuration, you need to redistribute the ATL.DLL.

>but the application aborts when run on a 95 machine.

Any error messages?
0
 
tsvenkatAuthor Commented:
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
0
 
chensuCommented:
>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.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now