Win32 DLL & Win32 Static Library - DOTNET

This is a discussion on Win32 DLL & Win32 Static Library - DOTNET ; Hello, I am using Visual Studio.net 2003. I am trying to find how to create Win32 DLL &amp; Win32 Static Library. When going through the wizard it does not show me the option for these two project types. Any Idea? ...

1. Win32 DLL & Win32 Static Library

Hello,
I am using Visual Studio.net 2003.
I am trying to find how to create Win32 DLL & Win32 Static Library.
When going through the wizard it does not show me the option for these two
project types.
Any Idea?
Eitan

2. RE: Win32 DLL & Win32 Static Library

Hello Eitan,

What you can do, is to select Win32 Project amoung the Visual C++ project
templates, and then, on the first dialog box of the Wizard, click on
Application Settings. There you can choose to create a Win32 DLL or a Win32
Static Library.

Daryush

"Eitan" wrote:

> Hello,
> I am using Visual Studio.net 2003.
> I am trying to find how to create Win32 DLL & Win32 Static Library.
> When going through the wizard it does not show me the option for these two
> project types.
> Any Idea?
> Eitan

3. RE: Win32 DLL & Win32 Static Library

I am trying to create a "Resource Only DLL". I followed your info, thanks,
however the /NOENTRY linker option, as per the documentation, cause a linker
problem. Any idea why?
Eitan

"Daryush" wrote:

> Hello Eitan,
>
> What you can do, is to select Win32 Project amoung the Visual C++ project
> templates, and then, on the first dialog box of the Wizard, click on
> Application Settings. There you can choose to create a Win32 DLL or a Win32
> Static Library.
>
> Daryush
>
>
> "Eitan" wrote:
>
> > Hello,
> > I am using Visual Studio.net 2003.
> > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > When going through the wizard it does not show me the option for these two
> > project types.
> > Any Idea?
> > Eitan

4. RE: Win32 DLL & Win32 Static Library

Here is what I did:
1. Created Win32 Project.
2. In the Application Settings section, chose DLL and Empty Project (Did not
3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
5. Successfully built the DLL.

I was even able to add a RESX file to this project (RESX file was a part of
a C# Localization test application) and it still worked.

Try it once again, makesure that you choose the Empty Project option. See
what happens. Good Luck.

Daryush

"Eitan" wrote:

> I am trying to create a "Resource Only DLL". I followed your info, thanks,
> however the /NOENTRY linker option, as per the documentation, cause a linker
> problem. Any idea why?
> Eitan
>
>
> "Daryush" wrote:
>
> > Hello Eitan,
> >
> > What you can do, is to select Win32 Project amoung the Visual C++ project
> > templates, and then, on the first dialog box of the Wizard, click on
> > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > Static Library.
> >
> > Daryush
> >
> >
> > "Eitan" wrote:
> >
> > > Hello,
> > > I am using Visual Studio.net 2003.
> > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > When going through the wizard it does not show me the option for these two
> > > project types.
> > > Any Idea?
> > > Eitan

5. RE: Win32 DLL & Win32 Static Library

I did create the project, and it compiled. But without adding files .cpp
and/or .h there is not DLL created.
What do you put in the CPP and/or the H files?

"Daryush" wrote:

> Here is what I did:
> 1. Created Win32 Project.
> 2. In the Application Settings section, chose DLL and Empty Project (Did not
> 3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
> 4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
> 5. Successfully built the DLL.
>
> I was even able to add a RESX file to this project (RESX file was a part of
> a C# Localization test application) and it still worked.
>
> Try it once again, makesure that you choose the Empty Project option. See
> what happens. Good Luck.
>
> Daryush
>
>
> "Eitan" wrote:
>
> > I am trying to create a "Resource Only DLL". I followed your info, thanks,
> > however the /NOENTRY linker option, as per the documentation, cause a linker
> > problem. Any idea why?
> > Eitan
> >
> >
> > "Daryush" wrote:
> >
> > > Hello Eitan,
> > >
> > > What you can do, is to select Win32 Project amoung the Visual C++ project
> > > templates, and then, on the first dialog box of the Wizard, click on
> > > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > > Static Library.
> > >
> > > Daryush
> > >
> > >
> > > "Eitan" wrote:
> > >
> > > > Hello,
> > > > I am using Visual Studio.net 2003.
> > > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > > When going through the wizard it does not show me the option for these two
> > > > project types.
> > > > Any Idea?
> > > > Eitan

6. RE: Win32 DLL & Win32 Static Library

Hi Eitan,

I actually do have a resource DLL. I think there must be something wrong
with the way you have setup your VC++ project. Here is my .vcproj file for
you to review. Notice that the Resource Only DLL falg is set for both Release
and Debug:

<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="ResourceOnlyDLL"
ProjectGUID="{6799E433-485C-4E48-B948-16BD0D9D8BD4}"
RootNamespace="ResourceOnlyDLL"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="\$(OutDir)/ResourceOnlyDLL.pdb"
SubSystem="2"
ResourceOnlyDLL="TRUE"
ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
RuntimeLibrary="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ResourceOnlyDLL="TRUE"
ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
</Filter>
<Filter
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\americanflag.bmp">
</File>
<File
RelativePath="..\GeneralConsoleApp\App.ico">
</File>
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\ResourceDemo\Form1.resx">
</File>
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\franceflag.bmp">
</File>
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\germanflag.bmp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

"Eitan" wrote:

> I did create the project, and it compiled. But without adding files .cpp
> and/or .h there is not DLL created.
> What do you put in the CPP and/or the H files?
>
> "Daryush" wrote:
>
> > Here is what I did:
> > 1. Created Win32 Project.
> > 2. In the Application Settings section, chose DLL and Empty Project (Did not
> > 3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
> > 4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
> > 5. Successfully built the DLL.
> >
> > I was even able to add a RESX file to this project (RESX file was a part of
> > a C# Localization test application) and it still worked.
> >
> > Try it once again, makesure that you choose the Empty Project option. See
> > what happens. Good Luck.
> >
> > Daryush
> >
> >
> > "Eitan" wrote:
> >
> > > I am trying to create a "Resource Only DLL". I followed your info, thanks,
> > > however the /NOENTRY linker option, as per the documentation, cause a linker
> > > problem. Any idea why?
> > > Eitan
> > >
> > >
> > > "Daryush" wrote:
> > >
> > > > Hello Eitan,
> > > >
> > > > What you can do, is to select Win32 Project amoung the Visual C++ project
> > > > templates, and then, on the first dialog box of the Wizard, click on
> > > > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > > > Static Library.
> > > >
> > > > Daryush
> > > >
> > > >
> > > > "Eitan" wrote:
> > > >
> > > > > Hello,
> > > > > I am using Visual Studio.net 2003.
> > > > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > > > When going through the wizard it does not show me the option for these two
> > > > > project types.
> > > > > Any Idea?
> > > > > Eitan

7. RE: Win32 DLL & Win32 Static Library

Hello Daryush,

My last question ment to say:
If you create an empty project the CPP and H file are not generated and
after compilation no DLL is generated.

Eitan

"Daryush" wrote:

> Hi Eitan,
>
> I actually do have a resource DLL. I think there must be something wrong
> with the way you have setup your VC++ project. Here is my .vcproj file for
> you to review. Notice that the Resource Only DLL falg is set for both Release
> and Debug:
>
> <?xml version="1.0" encoding="Windows-1252"?>
> <VisualStudioProject
> ProjectType="Visual C++"
> Version="7.10"
> Name="ResourceOnlyDLL"
> ProjectGUID="{6799E433-485C-4E48-B948-16BD0D9D8BD4}"
> RootNamespace="ResourceOnlyDLL"
> Keyword="Win32Proj">
> <Platforms>
> <Platform
> Name="Win32"/>
> </Platforms>
> <Configurations>
> <Configuration
> Name="Debug|Win32"
> OutputDirectory="Debug"
> IntermediateDirectory="Debug"
> ConfigurationType="2"
> CharacterSet="2">
> <Tool
> Name="VCCLCompilerTool"
> Optimization="0"
> PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
> MinimalRebuild="TRUE"
> BasicRuntimeChecks="3"
> RuntimeLibrary="1"
> WarningLevel="3"
> Detect64BitPortabilityProblems="TRUE"
> DebugInformationFormat="4"/>
> <Tool
> Name="VCCustomBuildTool"/>
> <Tool
> OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
> GenerateDebugInformation="TRUE"
> ProgramDatabaseFile="\$(OutDir)/ResourceOnlyDLL.pdb"
> SubSystem="2"
> ResourceOnlyDLL="TRUE"
> ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
> TargetMachine="1"/>
> <Tool
> Name="VCMIDLTool"/>
> <Tool
> Name="VCPostBuildEventTool"/>
> <Tool
> Name="VCPreBuildEventTool"/>
> <Tool
> <Tool
> Name="VCResourceCompilerTool"/>
> <Tool
> Name="VCWebServiceProxyGeneratorTool"/>
> <Tool
> Name="VCXMLDataGeneratorTool"/>
> <Tool
> Name="VCWebDeploymentTool"/>
> <Tool
> Name="VCManagedWrapperGeneratorTool"/>
> <Tool
> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
> </Configuration>
> <Configuration
> Name="Release|Win32"
> OutputDirectory="Release"
> IntermediateDirectory="Release"
> ConfigurationType="2"
> CharacterSet="2">
> <Tool
> Name="VCCLCompilerTool"
> PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
> RuntimeLibrary="0"
> WarningLevel="3"
> Detect64BitPortabilityProblems="TRUE"
> DebugInformationFormat="3"/>
> <Tool
> Name="VCCustomBuildTool"/>
> <Tool
> OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
> GenerateDebugInformation="TRUE"
> SubSystem="2"
> OptimizeReferences="2"
> EnableCOMDATFolding="2"
> ResourceOnlyDLL="TRUE"
> ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
> TargetMachine="1"/>
> <Tool
> Name="VCMIDLTool"/>
> <Tool
> Name="VCPostBuildEventTool"/>
> <Tool
> Name="VCPreBuildEventTool"/>
> <Tool
> <Tool
> Name="VCResourceCompilerTool"/>
> <Tool
> Name="VCWebServiceProxyGeneratorTool"/>
> <Tool
> Name="VCXMLDataGeneratorTool"/>
> <Tool
> Name="VCWebDeploymentTool"/>
> <Tool
> Name="VCManagedWrapperGeneratorTool"/>
> <Tool
> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
> </Configuration>
> </Configurations>
> <References>
> </References>
> <Files>
> <Filter
> Name="Source Files"
> Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
> </Filter>
> <Filter
> Filter="h;hpp;hxx;hm;inl;inc;xsd"
> UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
> </Filter>
> <Filter
> Name="Resource Files"
> Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
> <File
> RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\americanflag.bmp">
> </File>
> <File
> RelativePath="..\GeneralConsoleApp\App.ico">
> </File>
> <File
> RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\ResourceDemo\Form1.resx">
> </File>
> <File
> RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\franceflag.bmp">
> </File>
> <File
> RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\germanflag.bmp">
> </File>
> </Filter>
> </Files>
> <Globals>
> </Globals>
> </VisualStudioProject>
>
>
>
>
> "Eitan" wrote:
>
> > I did create the project, and it compiled. But without adding files .cpp
> > and/or .h there is not DLL created.
> > What do you put in the CPP and/or the H files?
> >
> > "Daryush" wrote:
> >
> > > Here is what I did:
> > > 1. Created Win32 Project.
> > > 2. In the Application Settings section, chose DLL and Empty Project (Did not
> > > add MFC support).
> > > 3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
> > > 4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
> > > 5. Successfully built the DLL.
> > >
> > > I was even able to add a RESX file to this project (RESX file was a part of
> > > a C# Localization test application) and it still worked.
> > >
> > > Try it once again, makesure that you choose the Empty Project option. See
> > > what happens. Good Luck.
> > >
> > > Daryush
> > >
> > >
> > > "Eitan" wrote:
> > >
> > > > I am trying to create a "Resource Only DLL". I followed your info, thanks,
> > > > however the /NOENTRY linker option, as per the documentation, cause a linker
> > > > problem. Any idea why?
> > > > Eitan
> > > >
> > > >
> > > > "Daryush" wrote:
> > > >
> > > > > Hello Eitan,
> > > > >
> > > > > What you can do, is to select Win32 Project amoung the Visual C++ project
> > > > > templates, and then, on the first dialog box of the Wizard, click on
> > > > > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > > > > Static Library.
> > > > >
> > > > > Daryush
> > > > >
> > > > >
> > > > > "Eitan" wrote:
> > > > >
> > > > > > Hello,
> > > > > > I am using Visual Studio.net 2003.
> > > > > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > > > > When going through the wizard it does not show me the option for these two
> > > > > > project types.
> > > > > > Any Idea?
> > > > > > Eitan

8. RE: Win32 DLL & Win32 Static Library

If you create an empty project, and set it to be a DLL, you may have one of
these four situations:

(1) You may add .cpp and .h files, in order to create a regular DLL.
(2) You may add .cpp and .h files, along with some resources (i.e., Icons,
Bitmaps,...), in order to have a DLL which provides both functionality and
resources.
(3) You may add only resources, and set the ResourceOnlyDLL to true, in
order to get a resource DLL (when you build, you should get a DLL. If you are
no DLL is being created, then you may have a bad installation).
(4) If you do not add any resources, .cpp or .h files, then you will NOT get
a DLL.

In any of the first three situations, you SHOULD get a DLL if you build the
solution.

Daryush

"Eitan" wrote:

> Hello Daryush,
>
> My last question ment to say:
> If you create an empty project the CPP and H file are not generated and
> after compilation no DLL is generated.
>
> Eitan
>
> "Daryush" wrote:
>
> > Hi Eitan,
> >
> > I actually do have a resource DLL. I think there must be something wrong
> > with the way you have setup your VC++ project. Here is my .vcproj file for
> > you to review. Notice that the Resource Only DLL falg is set for both Release
> > and Debug:
> >
> > <?xml version="1.0" encoding="Windows-1252"?>
> > <VisualStudioProject
> > ProjectType="Visual C++"
> > Version="7.10"
> > Name="ResourceOnlyDLL"
> > ProjectGUID="{6799E433-485C-4E48-B948-16BD0D9D8BD4}"
> > RootNamespace="ResourceOnlyDLL"
> > Keyword="Win32Proj">
> > <Platforms>
> > <Platform
> > Name="Win32"/>
> > </Platforms>
> > <Configurations>
> > <Configuration
> > Name="Debug|Win32"
> > OutputDirectory="Debug"
> > IntermediateDirectory="Debug"
> > ConfigurationType="2"
> > CharacterSet="2">
> > <Tool
> > Name="VCCLCompilerTool"
> > Optimization="0"
> > PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
> > MinimalRebuild="TRUE"
> > BasicRuntimeChecks="3"
> > RuntimeLibrary="1"
> > WarningLevel="3"
> > Detect64BitPortabilityProblems="TRUE"
> > DebugInformationFormat="4"/>
> > <Tool
> > Name="VCCustomBuildTool"/>
> > <Tool
> > OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
> > GenerateDebugInformation="TRUE"
> > ProgramDatabaseFile="\$(OutDir)/ResourceOnlyDLL.pdb"
> > SubSystem="2"
> > ResourceOnlyDLL="TRUE"
> > ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
> > TargetMachine="1"/>
> > <Tool
> > Name="VCMIDLTool"/>
> > <Tool
> > Name="VCPostBuildEventTool"/>
> > <Tool
> > Name="VCPreBuildEventTool"/>
> > <Tool
> > <Tool
> > Name="VCResourceCompilerTool"/>
> > <Tool
> > Name="VCWebServiceProxyGeneratorTool"/>
> > <Tool
> > Name="VCXMLDataGeneratorTool"/>
> > <Tool
> > Name="VCWebDeploymentTool"/>
> > <Tool
> > Name="VCManagedWrapperGeneratorTool"/>
> > <Tool
> > Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
> > </Configuration>
> > <Configuration
> > Name="Release|Win32"
> > OutputDirectory="Release"
> > IntermediateDirectory="Release"
> > ConfigurationType="2"
> > CharacterSet="2">
> > <Tool
> > Name="VCCLCompilerTool"
> > PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
> > RuntimeLibrary="0"
> > WarningLevel="3"
> > Detect64BitPortabilityProblems="TRUE"
> > DebugInformationFormat="3"/>
> > <Tool
> > Name="VCCustomBuildTool"/>
> > <Tool
> > OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
> > GenerateDebugInformation="TRUE"
> > SubSystem="2"
> > OptimizeReferences="2"
> > EnableCOMDATFolding="2"
> > ResourceOnlyDLL="TRUE"
> > ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
> > TargetMachine="1"/>
> > <Tool
> > Name="VCMIDLTool"/>
> > <Tool
> > Name="VCPostBuildEventTool"/>
> > <Tool
> > Name="VCPreBuildEventTool"/>
> > <Tool
> > <Tool
> > Name="VCResourceCompilerTool"/>
> > <Tool
> > Name="VCWebServiceProxyGeneratorTool"/>
> > <Tool
> > Name="VCXMLDataGeneratorTool"/>
> > <Tool
> > Name="VCWebDeploymentTool"/>
> > <Tool
> > Name="VCManagedWrapperGeneratorTool"/>
> > <Tool
> > Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
> > </Configuration>
> > </Configurations>
> > <References>
> > </References>
> > <Files>
> > <Filter
> > Name="Source Files"
> > Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
> > UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
> > </Filter>
> > <Filter
> > Filter="h;hpp;hxx;hm;inl;inc;xsd"
> > UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
> > </Filter>
> > <Filter
> > Name="Resource Files"
> > Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
> > <File
> > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\americanflag.bmp">
> > </File>
> > <File
> > RelativePath="..\GeneralConsoleApp\App.ico">
> > </File>
> > <File
> > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\ResourceDemo\Form1.resx">
> > </File>
> > <File
> > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\franceflag.bmp">
> > </File>
> > <File
> > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\germanflag.bmp">
> > </File>
> > </Filter>
> > </Files>
> > <Globals>
> > </Globals>
> > </VisualStudioProject>
> >
> >
> >
> >
> > "Eitan" wrote:
> >
> > > I did create the project, and it compiled. But without adding files .cpp
> > > and/or .h there is not DLL created.
> > > What do you put in the CPP and/or the H files?
> > >
> > > "Daryush" wrote:
> > >
> > > > Here is what I did:
> > > > 1. Created Win32 Project.
> > > > 2. In the Application Settings section, chose DLL and Empty Project (Did not
> > > > add MFC support).
> > > > 3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
> > > > 4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
> > > > 5. Successfully built the DLL.
> > > >
> > > > I was even able to add a RESX file to this project (RESX file was a part of
> > > > a C# Localization test application) and it still worked.
> > > >
> > > > Try it once again, makesure that you choose the Empty Project option. See
> > > > what happens. Good Luck.
> > > >
> > > > Daryush
> > > >
> > > >
> > > > "Eitan" wrote:
> > > >
> > > > > I am trying to create a "Resource Only DLL". I followed your info, thanks,
> > > > > however the /NOENTRY linker option, as per the documentation, cause a linker
> > > > > problem. Any idea why?
> > > > > Eitan
> > > > >
> > > > >
> > > > > "Daryush" wrote:
> > > > >
> > > > > > Hello Eitan,
> > > > > >
> > > > > > What you can do, is to select Win32 Project amoung the Visual C++ project
> > > > > > templates, and then, on the first dialog box of the Wizard, click on
> > > > > > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > > > > > Static Library.
> > > > > >
> > > > > > Daryush
> > > > > >
> > > > > >
> > > > > > "Eitan" wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > > I am using Visual Studio.net 2003.
> > > > > > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > > > > > When going through the wizard it does not show me the option for these two
> > > > > > > project types.
> > > > > > > Any Idea?
> > > > > > > Eitan

9. RE: Win32 DLL & Win32 Static Library

Hello Daryush,

I understand that I will have to provide the .CPP & .H & .RC files (plus the
bmp and etc.). However do you know where I can get the STUB for the .CPP and
..H files.

These are the files I was hoping the Wizard will build.

Thanks,
Eitan

"Daryush" wrote:

> If you create an empty project, and set it to be a DLL, you may have one of
> these four situations:
>
> (1) You may add .cpp and .h files, in order to create a regular DLL.
> (2) You may add .cpp and .h files, along with some resources (i.e., Icons,
> Bitmaps,...), in order to have a DLL which provides both functionality and
> resources.
> (3) You may add only resources, and set the ResourceOnlyDLL to true, in
> order to get a resource DLL (when you build, you should get a DLL. If you are
> no DLL is being created, then you may have a bad installation).
> (4) If you do not add any resources, .cpp or .h files, then you will NOT get
> a DLL.
>
> In any of the first three situations, you SHOULD get a DLL if you build the
> solution.
>
> Daryush
>
>
>
> "Eitan" wrote:
>
> > Hello Daryush,
> >
> > My last question ment to say:
> > If you create an empty project the CPP and H file are not generated and
> > after compilation no DLL is generated.
> >
> > Eitan
> >
> > "Daryush" wrote:
> >
> > > Hi Eitan,
> > >
> > > I actually do have a resource DLL. I think there must be something wrong
> > > with the way you have setup your VC++ project. Here is my .vcproj file for
> > > you to review. Notice that the Resource Only DLL falg is set for both Release
> > > and Debug:
> > >
> > > <?xml version="1.0" encoding="Windows-1252"?>
> > > <VisualStudioProject
> > > ProjectType="Visual C++"
> > > Version="7.10"
> > > Name="ResourceOnlyDLL"
> > > ProjectGUID="{6799E433-485C-4E48-B948-16BD0D9D8BD4}"
> > > RootNamespace="ResourceOnlyDLL"
> > > Keyword="Win32Proj">
> > > <Platforms>
> > > <Platform
> > > Name="Win32"/>
> > > </Platforms>
> > > <Configurations>
> > > <Configuration
> > > Name="Debug|Win32"
> > > OutputDirectory="Debug"
> > > IntermediateDirectory="Debug"
> > > ConfigurationType="2"
> > > CharacterSet="2">
> > > <Tool
> > > Name="VCCLCompilerTool"
> > > Optimization="0"
> > > PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
> > > MinimalRebuild="TRUE"
> > > BasicRuntimeChecks="3"
> > > RuntimeLibrary="1"
> > > WarningLevel="3"
> > > Detect64BitPortabilityProblems="TRUE"
> > > DebugInformationFormat="4"/>
> > > <Tool
> > > Name="VCCustomBuildTool"/>
> > > <Tool
> > > OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
> > > GenerateDebugInformation="TRUE"
> > > ProgramDatabaseFile="\$(OutDir)/ResourceOnlyDLL.pdb"
> > > SubSystem="2"
> > > ResourceOnlyDLL="TRUE"
> > > ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
> > > TargetMachine="1"/>
> > > <Tool
> > > Name="VCMIDLTool"/>
> > > <Tool
> > > Name="VCPostBuildEventTool"/>
> > > <Tool
> > > Name="VCPreBuildEventTool"/>
> > > <Tool
> > > <Tool
> > > Name="VCResourceCompilerTool"/>
> > > <Tool
> > > Name="VCWebServiceProxyGeneratorTool"/>
> > > <Tool
> > > Name="VCXMLDataGeneratorTool"/>
> > > <Tool
> > > Name="VCWebDeploymentTool"/>
> > > <Tool
> > > Name="VCManagedWrapperGeneratorTool"/>
> > > <Tool
> > > Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
> > > </Configuration>
> > > <Configuration
> > > Name="Release|Win32"
> > > OutputDirectory="Release"
> > > IntermediateDirectory="Release"
> > > ConfigurationType="2"
> > > CharacterSet="2">
> > > <Tool
> > > Name="VCCLCompilerTool"
> > > PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
> > > RuntimeLibrary="0"
> > > WarningLevel="3"
> > > Detect64BitPortabilityProblems="TRUE"
> > > DebugInformationFormat="3"/>
> > > <Tool
> > > Name="VCCustomBuildTool"/>
> > > <Tool
> > > OutputFile="\$(OutDir)/ResourceOnlyDLL.dll"
> > > GenerateDebugInformation="TRUE"
> > > SubSystem="2"
> > > OptimizeReferences="2"
> > > EnableCOMDATFolding="2"
> > > ResourceOnlyDLL="TRUE"
> > > ImportLibrary="\$(OutDir)/ResourceOnlyDLL.lib"
> > > TargetMachine="1"/>
> > > <Tool
> > > Name="VCMIDLTool"/>
> > > <Tool
> > > Name="VCPostBuildEventTool"/>
> > > <Tool
> > > Name="VCPreBuildEventTool"/>
> > > <Tool
> > > <Tool
> > > Name="VCResourceCompilerTool"/>
> > > <Tool
> > > Name="VCWebServiceProxyGeneratorTool"/>
> > > <Tool
> > > Name="VCXMLDataGeneratorTool"/>
> > > <Tool
> > > Name="VCWebDeploymentTool"/>
> > > <Tool
> > > Name="VCManagedWrapperGeneratorTool"/>
> > > <Tool
> > > Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
> > > </Configuration>
> > > </Configurations>
> > > <References>
> > > </References>
> > > <Files>
> > > <Filter
> > > Name="Source Files"
> > > Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
> > > UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
> > > </Filter>
> > > <Filter
> > > Filter="h;hpp;hxx;hm;inl;inc;xsd"
> > > UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
> > > </Filter>
> > > <Filter
> > > Name="Resource Files"
> > > Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
> > > <File
> > > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\americanflag.bmp">
> > > </File>
> > > <File
> > > RelativePath="..\GeneralConsoleApp\App.ico">
> > > </File>
> > > <File
> > > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\ResourceDemo\Form1.resx">
> > > </File>
> > > <File
> > > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\franceflag.bmp">
> > > </File>
> > > <File
> > > RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\germanflag.bmp">
> > > </File>
> > > </Filter>
> > > </Files>
> > > <Globals>
> > > </Globals>
> > > </VisualStudioProject>
> > >
> > >
> > >
> > >
> > > "Eitan" wrote:
> > >
> > > > I did create the project, and it compiled. But without adding files .cpp
> > > > and/or .h there is not DLL created.
> > > > What do you put in the CPP and/or the H files?
> > > >
> > > > "Daryush" wrote:
> > > >
> > > > > Here is what I did:
> > > > > 1. Created Win32 Project.
> > > > > 2. In the Application Settings section, chose DLL and Empty Project (Did not
> > > > > add MFC support).
> > > > > 3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
> > > > > 4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
> > > > > 5. Successfully built the DLL.
> > > > >
> > > > > I was even able to add a RESX file to this project (RESX file was a part of
> > > > > a C# Localization test application) and it still worked.
> > > > >
> > > > > Try it once again, makesure that you choose the Empty Project option. See
> > > > > what happens. Good Luck.
> > > > >
> > > > > Daryush
> > > > >
> > > > >
> > > > > "Eitan" wrote:
> > > > >
> > > > > > I am trying to create a "Resource Only DLL". I followed your info, thanks,
> > > > > > however the /NOENTRY linker option, as per the documentation, cause a linker
> > > > > > problem. Any idea why?
> > > > > > Eitan
> > > > > >
> > > > > >
> > > > > > "Daryush" wrote:
> > > > > >
> > > > > > > Hello Eitan,
> > > > > > >
> > > > > > > What you can do, is to select Win32 Project amoung the Visual C++ project
> > > > > > > templates, and then, on the first dialog box of the Wizard, click on
> > > > > > > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > > > > > > Static Library.
> > > > > > >
> > > > > > > Daryush
> > > > > > >
> > > > > > >
> > > > > > > "Eitan" wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > > I am using Visual Studio.net 2003.
> > > > > > > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > > > > > > When going through the wizard it does not show me the option for these two
> > > > > > > > project types.
> > > > > > > > Any Idea?
> > > > > > > > Eitan