Visual Basic Support
Previous Top Next

This topic addresses issues specific to Visual Basic 3,4,5, and 6 Developers.

Developers using VB.NET should consult the .NET Support information topic.

Thinstall fully supports all versions of Visual Basic. Click here for an example and more information about how Thinstall benifits Visual Basic Developers.

Some Thinstall benifits for VB develpers:

· Runs without extraction of DLLs, OCXs, or data files on "fresh" installs of Windows 95 & 98 and up.
· Runs with zero installation process.
· Runs without "registering" OCX & ActiveX controls.
· Can be run directly from CDROM.
· Can be run from any user account, even if system registry access is denied.
· Runs even if VB Runtime files are deleted or corrupted.
· Runs even if ActiveX Controls are unregistered, deleted, or corrupted.
· This demo uses VB5, VB6, and C runtimes all in one EXE



How do I achive the best loading speed for Visual Basic?


1. Tell Thinstall not to load any unneeded external DLLs. Loading external DLLs can slow down your program loading speed. When you disable external DLL loading, Thinstall will not need to process the majority of the DLLs used by your program.

2. Disable compression for the main EXE and Thinstall Operating System and use fast compression for any other files accessed during program startup. By only compressing the files not used during program startup, you can increase your loading speed.

The steps to do this are:
A. Use Options -> Compression -> No compression (this sets the default compression to None, the Thinstall Operating System is always compressed using the default compresion option)
B. Select all of the files in your project that are not needed during program startup and right-click on them. In the right-click menu select Compression -> Fastest Load Time.

3. Do no use the Anti-Debugging features (these are off by default because the can introduce compatibility problem). Anti-debugging works by running two copies of your program and this will slow down your program loading times..


How do I achieve the best security for Visual Basic to stop hacking?

1. Hide your original EXE contents. This is the most important security modification you should make for VB5/6 programs!
· Link -> Program Security -> EXE visibility (check the box marked: Always hide EXE contents)

2. Tell Thinstall not to load any unneeded external DLLs. Disabling makes it difficult for someone to use code-injection techniques to access your internal files. Any non-operating system DLL that your program uses should be included in your project file for best security. For VB5/6 programs this means MSVBVM50.DLL / MSVBVM60.DLL, and probably files like oleaut32.dll and olepro32.dll.

3. Make all compatible data files and DLLs invisible to search request. This makes it difficult to access your internal files if code-injection is accomplished.

To make a DLL or data file invisible to search request, select the file in question and from the right-click menu select the option:
Visibility -> Invisible to Search / Enum Request

In some cases a programs or DLLs could malfunction if it cannot enumerate specific file. You need to test your application after changing the visibility of the file to ensure it still loads and runs without problems.


4. Ensure the standard protection options are enabled, these are:
· Link -> Program Security -> PE Header ->Destroy PE Header (enabled)
· Link -> Program Security -> PE Header ->Enable Anti-procdump (enabled)



How do I obtain the maximum level of compatibility and least likelihood of introducing unexpected errors?

1. Tell Thinstall not to load any unneeded external DLLs. When Thinstall loads all external DLLs, there is opportunity to load a DLL which is incompatible with Thinstall. Although we aren't aware of any DLLs that are incompatible that doesn't mean they don't exist. Many programs will load external DLLs they are not aware of on various systems - for example Instant Messenger clients

2. Test your application on all versions of Windows you plan to support. For comprehensive testing, we recommend testing the following platforms:

Windows 95A
Windows 95C
Windows 98
Windows 98 Second Edition
Windows 98 Second Edition with Internet Explorer 6+ installed
Windows ME
Windows ME (East Asian Language version such as Japanese or Chinese)
Windows NT 3.51
Windows NT 4.0
Windows 2000
Windows 2000 Service Pack 3
Windows 2000 Service Pack 4
Windows 2000 Service Pack 4 Guest User Account
Windows XP
Windows XP (East Asian Language version such as Japanese or Chinese)


If you are strapped for time and can only test a few of these, the most important are: Windows 98, Windows 2k SP4, and Windows XP.
You may also want to consider testing under the following conditions:

· Test running on your minimum system requirements
· Test running from a network drive
· Test running from CDROM if you plan to support this.
· Test running when your EXE is renamed
· Test running your EXE from a different current-working-directory from where the EXE is located
· Test running from Guest User account



How to disable external DLL Loading for unneeded DLLs

By reducing or entirely eliminating the external DLLs loaded by Thinstall for your program, you will increase your loading speed, reduce compatability problems, and achieve a higher level of security against hackers. If your program does not use the virtual registry feature you may be to eliminate all external DLL loading. To do this, use the menu option:

Link -> Program Security -> External DLL Loading, then remove the "\" from the list saying "Thinstall loads all DLLs matching this pattern". The "\" will match all DLLs, so Thinstall loads all DLLs used by your program directly or indirectly.

Adding Virtual Registry support to COM
If your program uses the virtual registry features, then you will need to add the following DLLs to the list of DLLs thinstall will load. To do this add the following 3 patterns to the list described above:

oleaut32.dll
ole32.dll
comdlg32.dll

Adding support for COM controls that use the C Runtime
Some COM controls used by Visual Basic developers are written in C and will use the C Runtime library. In order to allow the COM controls to run properly under Thinstall you may need to also tell Thinstall to load C Runtime library DLLs. To do this add the following pattern to the list described above.

msvcrt.dll

other C Runtime DLLs can be added to your Thinstall project file so they will be loaded internally, however in some cases msvcrt.dll is always loaded externally.