PRB: "Locate" Dialog Appears When Running Setup WizardLast reviewed: October 16, 1997Article ID: Q173049 |
The information in this article applies to:
SYMPTOMSWhen running the Microsoft Visual Basic Application Setup Wizard, a dialog titled "Locate Kernel," "Locate User," "Locate GDI," etc., is displayed after you click the Next button on the "Setup Wizard - Select Project and Options" form.
CAUSEThe Visual Basic Application Setup Wizard scans a project's files for Declare statements to determine if any additional dependency files need to be distributed. If any such files are found, the user is prompted for the location of the files with the "Locate" dialog. If any declarations for 16-bit DLLs are found in the project's files, the user is prompted for the location. For example, if the following 16-bit declaration appears in the project:
Declare Function GetWindowsDirectory Lib "Kernel" _ (ByVal lpBuffer As String, ByVal nSize As Integer) As IntegerSetup Wizard will prompt the user for the location of the Kernel DLL with the "Locate" dialog. This is a very common problem with applications converted from 16-bit Visual Basic to Visual Basic 5.0, which is 32-bit, or with Visual Basic 4.0 applications that use conditional compilations that have been converted to Visual Basic 5.0. Setup Wizard does not take into consideration the compiler directives when looking for Declare statements resulting, for example, in a "Locate Kernel" dialog for the sample code below:
#If Win32 Then Declare Function GetWindowsDirectory Lib "Kernel32" _ Alias "GetWindowsDirectoryA" _ (ByVal lpBuffer As String, ByVal nSize As Long) As Long #Else Declare Function GetWindowsDirectory Lib "Kernel" _ (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer #End If RESOLUTIONConvert all 16-bit declarations to their 32-bit equivalents and recompile the project, or, if conditional compilation was used to select between pairs of 16-bit and 32-bit declarations, the conditional compilation statements and 16-bit declarations can be commented out or removed and the project recompiled.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : vb5all VBKBSetup VBKBWinAPI VBKBWiz Version : WINDOWS:5.0 Platform : WINDOWS Hardware : x86 Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |