3
votes

I need to set the /TSAWARE flag for a legacy VB 6.0 activeX EXE. I can do it with

BINEDIT /TSAWARE app.exe

after building the app, but I'm thinking there should be a way to select it in the VB6 project itself in Visual Studio. I've looked at project properties but don't see anywhere to set linker options. The project is an ActiveX component.

This question mentions doing it in Visual Studio 6.0 with C++ in the linker but haven't seen way to do it in VB which doesn't seem to have explicit link settings.

2
VB6 is certainly older than Windows 2000, which is when Terminal Services really started to become a thing. I'm not sure if it's older than NT4 Terminal Services Edition. Regardless, VB6 is really that old.user65839
Ignore the trolls. People wouldn't be using VB6 if Microsoft had ever provided a replacement. Sadly it is the only general purpose high level language native compiler they ever produced for Windows.Bob77
Oh, I still love VB6. It's just that it is so old and unsupported, that when you try to use it with anything newer, you run into issues like this. It can be easy to forget how many things came out after VB6, and thus it may not handle easily out of the box.user65839

2 Answers

2
votes

Actually the "VB6 linker" (VS 6.0 LINK.EXE) does indeed support this flag. Of course you may have to be sure you have installed the VS 6.0 service packs through at least SP6.

To invoke this you can edit your Project's .VBP file, adding the section:

[VBCompiler]
LinkSwitches=/TSAWARE

Using a later "Microsoft (R) COFF/PE Dumper Version 8.00.50727.42" to dump the compiled EXE for confirmation, it shows as 8000 DLL characteristics Terminal Server Aware.

As far as I know this has worked for a very long time, perhaps since Service Pack 3.

2
votes

You are going to need to do it as you currently are, that flag is not supported by the VB6 linker:

A@ALEX C:\Program Files (x86)\Microsoft Visual Studio\VB98
> link /OUT:x.exe /TSAWARE x.obj
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : warning LNK4044: unrecognized option "TSAWARE"; ignored