From: Mihai N. on

> Looking again, the only thing which jumps out at me is that the project
> properties include the linker flag /NOENTRY

That is only to make the linker shut up.
But LoadLibrary should still fail, from what I know.
Weird, I have to check.


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

From: Mihai N. on

> I have one program I'll have to leave on 2008 since it needs to be as small
> as possible.

You can also give a try to UPX (http://upx.sourceforge.net/)
Does a good job, stable, and very popular.

You pay a small performance penalty at startup (to uncompress in memory),
but you also gain something by loading fewer bytes from disk, which is slow.
Overall, you will probably not notice.


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

From: David Webber on


"Mihai N." <nmihai_year_2000(a)yahoo.com> wrote in message
news:Xns9D841B7E732F6MihaiN(a)207.46.248.16...
>
>> Looking again, the only thing which jumps out at me is that the project
>> properties include the linker flag /NOENTRY
>
> That is only to make the linker shut up.
> But LoadLibrary should still fail, from what I know.
> Weird, I have to check.

I vaguely remember that resource-only DLLs have been possible for quite a
long time - possibly before new fangled ideas like LoadLibraryEx() ?

Just a thought - I may be wrong.

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 Webber on
"Mihai N." <nmihai_year_2000(a)yahoo.com> wrote in message
news:Xns9D841B7E732F6MihaiN(a)207.46.248.16...

>> Looking again, the only thing which jumps out at me is that the project
>> properties include the linker flag /NOENTRY
>
> That is only to make the linker shut up.
> But LoadLibrary should still fail, from what I know.
> Weird, I have to check.

Just to be specific, here is my code, complete with old comments! (My
class USERMODULE manages the loading of menus and other resources when the
user wants one of the non-English language options. This is a low-level
private static member used by the class. I think the only reason this
member exists at all was to encapsulate my experiments on different
methods!)

HINSTANCE USERMODULE::muLanguageDllLoad( LPCTSTR pszName )
{
HINSTANCE hInstLanguage(NULL);

// Test various options for loading resource-only DLL:

// hInstLanguage = ::LoadLibraryEx( pszName, NULL,
LOAD_LIBRARY_AS_DATAFILE );
// hInstLanguage = ::AfxLoadLibrary( pszName );

hInstLanguage = ::LoadLibrary( pszName );

return hInstLanguage;
}

It appears I have been remiss in not noting *why* I chose that one of the
three options :-(

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: Mihai N. on

> I vaguely remember that resource-only DLLs have been possible for quite a
> long time - possibly before new fangled ideas like LoadLibraryEx() ?

You needed a DllMain, from what I remember
(it was possible to build them, but not to load them)

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