Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘user’

BUG: User Defined Type Not Defined Using Binary Compatibility

Symptoms
When compiling an ActiveX DLL or ActiveX EXE with Binary Compatibility, thefollowing error occurs:

Compile Error : User defined type not defined
Resolution
Turn off Binary Compatibility and compile the project. Visual Basic willhighlight the line of code that contains the User Defined Type that is notdefined. After resolving the problem, Binary Compatibility can be turnedback on.

PRB: Instantiating Object in .exe Starts Another .exe Instance

Symptoms
When you instantiate a COM component in an out-of-process server (.exe)from Active Server Pages (ASP), another instance of the .exe starts.
Resolution
The default Identity of a COM component in an .exe is the Launching User.The implication of this is that when the Active Server Pages page tries tocreate an instance of this object, it is doing so in the security contextof the anonymous user (IUSR_<machine name>). If this is a different userfrom the user that started the instance of the .exe that is currentlyrunning, another instance of the .exe starts.

PRB: Instantiating Object in .exe Starts Another .exe Instance

Symptoms
When you instantiate a COM component in an out-of-process server (.exe)from Active Server Pages (ASP), another instance of the .exe starts.
Resolution
The default Identity of a COM component in an .exe is the Launching User.The implication of this is that when the Active Server Pages page tries tocreate an instance of this object, it is doing so in the security contextof the anonymous user (IUSR_<machine name>). If this is a different userfrom the user that started the instance of the .exe that is currentlyrunning, another instance of the .exe starts.

BUG: User Defined Type Not Defined Using Binary Compatibility

Symptoms
When compiling an ActiveX DLL or ActiveX EXE with Binary Compatibility, thefollowing error occurs:

Compile Error : User defined type not defined
Resolution
Turn off Binary Compatibility and compile the project. Visual Basic willhighlight the line of code that contains the User Defined Type that is notdefined. After resolving the problem, Binary Compatibility can be turnedback on.

BUG: Error 424 Adding Data Object Wizard-Created Ctrl to Form

Symptoms
When you try to place a user control that was created using the Data ObjectWizard onto a form, Error 424 (“Object Required”) occurs.
Resolution
When you place a user control on a form, that control’s Resize event isexecuted. If you create a list box or combo box type of user control usingthe Data Object Wizard, that control’s Resize event refers to the containedlist box or combo box incorrectly and causes error 424, “Object required.”

PRB: Error Message “Missing or Not Registered VB6tmpl.tlb” When You Start Visual Basic 6.0

Symptoms
When you start Visual Basic 6.0 under a new user account or after a new install, and you try to run the Visual Basic 6.0 executable file (VB6.exe), you get the following error message:

Visual Basic was not able to start up due to invalid system configuration. Missing or not registered VB6tmpl.tlb.You are unable to continue and Visual Basic shuts down.
Resolution
The main Visual Basic type library is either missing or mis-registered for the current user. This message reflects the original working name of this file but in released versions of Visual Basic this file was renamed VB6.olb and is located in the same directory as the Visual Basic 6.0 executable (VB6.exe).
The registry should contain a path to this file under the following key:
HKEY_CLASSES_ROOT\TypeLib\{FCFB3D2E-A0FA-1068-A738-08002B3371B5}\6.0\9\win32If the key is missing or pointing to a location where the file cannot be found, Visual Basic returns the preceding error message during startup.