The MASM Forum

General => The Campus => Topic started by: dedndave on March 18, 2013, 03:45:18 AM

Title: /SUBSYSTEM:* with /DLL
Post by: dedndave on March 18, 2013, 03:45:18 AM
in the masm32 example, \masm32\examples\exampl01\dll
the blddll.bat file has a linker command line:
\masm32\bin\Link /SUBSYSTEM:WINDOWS /DLL /DEF:tstdll.def tstdll.obj

my question is, for DLL's, is the subsystem relevant ?
it seems that, for example, that /SUBSYSTEM:CONSOLE wouldn't make any sense ?

wouldn't i get the same results with this ?
\masm32\bin\Link /DLL /DEF:tstdll.def tstdll.obj
Title: Re: /SUBSYSTEM:* with /DLL
Post by: jj2007 on March 18, 2013, 04:04:28 AM
You can print from a dll, but the console is opened by the calling app. The subsystem of the DLL should be Windows.
Title: Re: /SUBSYSTEM:* with /DLL
Post by: dedndave on March 18, 2013, 04:22:20 AM
yah - that's what i figured
the application "attributes" determines whether or not a console is opened
it seems that, if the entry point is WinMain or wWinMain, the default is SUBSYSTEM:WINDOWS
i guess that doesn't apply to a DLL   :P

thanks, again, Jochen   :t