We have an old OCX component written in VB6 that should be running on a Windows 2016 server that is giving some strange behaviors. The component runs on a windows 2008 R2 and and windows 2003 environment.
One of the things we noticed is.
Dim fso As New FileSystemObject
Causes an exception, when we change the code to
Dim fso As FileSystemObject
Set fso = New FileSystemObject
the exception is gone.
the form we are starting is started from a user control with the following code
Public Function Initialize(Optional ByVal pstrMapIni As String, Optional ByVal lGuiAllowed As Boolean = True)
GUIALLOWED = lGuiAllowed
If right(pstrMapIni, 1) <> "\" Then
pstrMapIni = pstrMapIni + "\"
End If
pstrMapIni = pstrMapIni + "map.ini"
frmMain.SetMapIni (pstrMapIni)
Load frmMain
End Function
the Load frmMain fails with a null ref exception
if someone has any idea of what direction we need to search... we are out of them.