Author Topic: /SUBSYSTEM:* with /DLL  (Read 4958 times)

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
/SUBSYSTEM:* with /DLL
« 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:
Code: [Select]
\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 ?
Code: [Select]
\masm32\bin\Link /DLL /DEF:tstdll.def tstdll.obj

jj2007

  • Member
  • *****
  • Posts: 13648
  • Assembly is fun ;-)
    • MasmBasic
Re: /SUBSYSTEM:* with /DLL
« Reply #1 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.

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: /SUBSYSTEM:* with /DLL
« Reply #2 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