From: David Webber on
Just spent a happy Sunday morning installing VS 2010.

Plus point: it found one syntax error in my several thousand .cpp files
which VS 2008 missed.

Problems: one or two minor ones not yet resolved.

Is there any reason why a resource only DLL compiled with VS2008 should not
work properly with a program compiled with VS2010 ?

What about other non-MFC DLLs with a pure C interface?

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: David Lowndes on
>Is there any reason why a resource only DLL compiled with VS2008 should not
>work properly with a program compiled with VS2010 ?

None that I can imagine.

>What about other non-MFC DLLs with a pure C interface?

Again, it ought to work.

Dave Lowndes
From: David Webber on


"David Lowndes" <DavidL(a)example.invalid> wrote in message
news:u6civ5l08acn07cf9ca55crpmbnkdc1mn5(a)4ax.com...

>>Is there any reason why a resource only DLL compiled with VS2008 should
>>not
>>work properly with a program compiled with VS2010 ?
>
> None that I can imagine.
>
>>What about other non-MFC DLLs with a pure C interface?
>
> Again, it ought to work.

Thought so. Thanks for the confirmation.

I was getting asserts when passing a NULL hInstance to
AfxSetResourceHandle() in the 2010 compilation. I thought perhaps it
wasn't loading the resource DLL's (and thus getting a NULL hInstance).
After I posted the question I recompiled all my DLLs with VS2010 and still
had the problem.

So I replaced
AfxSetResourceHandle( hInstance );
everywhere with
if( hInstance ) AfxSetResourceHandle( hInstance );

and it seems to work - all tests have been passed thus far.

So maybe, while AfxSetResourceHandle( NULL ) asserts in 2010, it was
fail-safe in 2008, and I just hadn't noticed that hInstance could be NULL in
some circumstances.

It might be something to look out for, for anyone upgrading the compiler.

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm


From: Joseph M. Newcomer on
See below...
On Sun, 23 May 2010 12:52:42 +0100, "David Webber" <dave(a)musical-dot-demon-dot-co.uk>
wrote:

>
>Just spent a happy Sunday morning installing VS 2010.
>
>Plus point: it found one syntax error in my several thousand .cpp files
>which VS 2008 missed.
>
>Problems: one or two minor ones not yet resolved.
>
>Is there any reason why a resource only DLL compiled with VS2008 should not
>work properly with a program compiled with VS2010 ?
****
Since there is no code, there should be no difference between the two.
****
>
>What about other non-MFC DLLs with a pure C interface?
***
Depends. Do they use the C Runtime (CRT)? If so, do they statically link it or used the
shared C runtime DLL?

If they use the shared C runtime DLL, you might have problems. If they statically link,
you have the problems of having multiple heaps being managed by multiple runtimes. This
hazard has not change because of VS2010.
joe
****
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Mihai N. on
> Is there any reason why a resource only DLL compiled with VS2008 should not
> work properly with a program compiled with VS2010 ?

No idea why. Except maybe something crazy with manifests?
It might also depend if it is really resource only, or if there is an
entry point.
(if you don't use LoadLibraryEx with LOAD_LIBRARY_AS_DATAFILE,
LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE, LOAD_LIBRARY_AS_IMAGE_RESOURCE,
or DONT_RESOLVE_DLL_REFERENCES, then you would need a DllMain)

Maybe a dumpbin /all and a diff would help.


--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email