Reputation: 526
Lately I was experimenting on my old VB6, and found there a strange thing.
Using ProcMon I found that while compiling, VB6 runs Link.exe with parameters like this:
LINK "D:\Folder\Form1.OBJ" "D:\Folder\Project1.OBJ"... /SUBSYSTEM:WINDOWS,4.0 ...
I wrote Link.exe /?
in cmd and found there
link.exe /?
usage: LINK [options] [files] [@commandfile]
options:
...
/SUBSYSTEM:{NATIVE|WINDOWS|CONSOLE|WINDOWSCE|POSIX}
By default VB6 compiles with parameter /SUBSYSTEM:WINDOWS.
But can I compile my VB6 code to Native or POSIX subsystem application?
Upvotes: 2
Views: 550
Reputation: 5689
VB applications uses Win32 calls, so there is no chance your application will work, even if you uses a console-only application.
Upvotes: 2
Reputation: 13267
Console is the only alternative subsystem that is useful. Posix isn't even present since Win2K and Native is for kernel mode drivers.
If any of this is news to you, I wonder why you are playing with ProcMon? Scary.
Upvotes: 0
Reputation: 9068
This just sets a bit in the resultung exe file. Visual Basic uses Microsoft's standard linker which is also used for C/C++, that's why the flag is there.
So yes, you can compile it with those settings, but I'm certain that the resulting exe won't run in native mode or in the Posix subsystem.
For more information on those settings you might want to check out information about the PE file format and have a look at the DUMPBIN and EDITBIN tools.
Upvotes: 3