Greetings,
I have a vb 6.0 "desktop" application that has multiple components. One of those components is a dll that gets called to perform various database functions. These functions include making the database connection, submitting SQL queries and returning results. It all works fine when it's run in the VB 6.0 IDE. However, when I try to run it on the command prompt, it errors out. The error occurs at this line:
Set Current_Database = Current_Workspace.OpenConnection("DOCUGEN Database", dbDriverNoPrompt, False, Connect_String)
where we set the database connection using the OpenConnection method of the Workspace. The Current_Database is a DAO connection object. This error is not captured by the program, the On Error statement seems to have no effect, the program just crashes. I am able to get this information from the Application Verifier logs:
<avrf:logfile xmlns:avrf="Application Verifier">
<avrf:logSession Version="2" PID="4432" TimeStarted="2017-05-19 : 08:14:07">
<avrf:logEntry Severity="Error" StopCode="0xE100" LayerName="Networking" Time="2017-05-19 : 08:14:08">
<avrf:message>Illegal networking API called from DllMain</avrf:message>
<avrf:parameter1>74a11d10 - Networking function being called from DllMain</avrf:parameter1>
<avrf:parameter2>8348fda - Name of Dll making invalid call if not NULL</avrf:parameter2>
<avrf:parameter3>0 - Not used</avrf:parameter3>
<avrf:parameter4>0 - Not used</avrf:parameter4>-<avrf:stackTrace>
<avrf:trace>vfnet!+74a13607 ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!ztcsl+39dd ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!+c991041 ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!ociepacm+3cb ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!ociepacm+484 ( @ 0)</avrf:trace>
<avrf:trace>vrfcore!VerifierTlsSetValue+431 ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+c55 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!RtlQueryEnvironmentVariable+241 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+b4d ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+a10 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrLoadDll+7b ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+1087 ( @ 0)</avrf:trace>
<avrf:trace>KERNELBASE!LoadLibraryExW+1f1 ( @ 0)</avrf:trace>
<avrf:trace>KERNELBASE!LoadLibraryExA+26 ( @ 0)</avrf:trace>
<avrf:trace>KERNEL32!LoadLibraryA+31 ( @ 0)</avrf:trace>
<avrf:trace>OCI!koptdumptds_check+617 ( @ 0)</avrf:trace>
<avrf:trace>OCI!lpminit+8 ( @ 0)</avrf:trace>
<avrf:trace>SQORA32!SQLTablesW+36a ( @ 0)</avrf:trace>
<avrf:trace>SQORA32!SQLTablesW+766 ( @ 0)</avrf:trace>
<avrf:trace>verifier!+728fc66d ( @ 0)</avrf:trace>
<avrf:trace>vrfcore!VerifierTlsSetValue+431 ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+c55 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!RtlQueryEnvironmentVariable+241 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+b4d ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+a10 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrLoadDll+7b ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+1087 ( @ 0)</avrf:trace>
<avrf:trace>KERNELBASE!LoadLibraryExW+1f1 ( @ 0)</avrf:trace>
<avrf:trace>ODBC32!VFreeErrors+2ff5 ( @ 0)</avrf:trace>
<avrf:trace>ODBC32!SQLDisconnect+593 ( @ 0)</avrf:trace>
<avrf:trace>ODBC32!SQLDisconnect+6f4 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+1933 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+1492 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+e7f ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+d29 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+c72 ( @ 0)</avrf:trace>
</avrf:stackTrace>
</avrf:logEntry>
</avrf:logSession>
</avrf:logfile>
Does anyone have any idea what is going on and how this can be resolved? Moving to different technologies is not an option because there is too much code involved.
Many thanks.
I have a vb 6.0 "desktop" application that has multiple components. One of those components is a dll that gets called to perform various database functions. These functions include making the database connection, submitting SQL queries and returning results. It all works fine when it's run in the VB 6.0 IDE. However, when I try to run it on the command prompt, it errors out. The error occurs at this line:
Set Current_Database = Current_Workspace.OpenConnection("DOCUGEN Database", dbDriverNoPrompt, False, Connect_String)
where we set the database connection using the OpenConnection method of the Workspace. The Current_Database is a DAO connection object. This error is not captured by the program, the On Error statement seems to have no effect, the program just crashes. I am able to get this information from the Application Verifier logs:
<avrf:logfile xmlns:avrf="Application Verifier">
<avrf:logSession Version="2" PID="4432" TimeStarted="2017-05-19 : 08:14:07">
<avrf:logEntry Severity="Error" StopCode="0xE100" LayerName="Networking" Time="2017-05-19 : 08:14:08">
<avrf:message>Illegal networking API called from DllMain</avrf:message>
<avrf:parameter1>74a11d10 - Networking function being called from DllMain</avrf:parameter1>
<avrf:parameter2>8348fda - Name of Dll making invalid call if not NULL</avrf:parameter2>
<avrf:parameter3>0 - Not used</avrf:parameter3>
<avrf:parameter4>0 - Not used</avrf:parameter4>-<avrf:stackTrace>
<avrf:trace>vfnet!+74a13607 ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!ztcsl+39dd ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!+c991041 ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!ociepacm+3cb ( @ 0)</avrf:trace>
<avrf:trace>OraOCIICUS11!ociepacm+484 ( @ 0)</avrf:trace>
<avrf:trace>vrfcore!VerifierTlsSetValue+431 ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+c55 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!RtlQueryEnvironmentVariable+241 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+b4d ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+a10 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrLoadDll+7b ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+1087 ( @ 0)</avrf:trace>
<avrf:trace>KERNELBASE!LoadLibraryExW+1f1 ( @ 0)</avrf:trace>
<avrf:trace>KERNELBASE!LoadLibraryExA+26 ( @ 0)</avrf:trace>
<avrf:trace>KERNEL32!LoadLibraryA+31 ( @ 0)</avrf:trace>
<avrf:trace>OCI!koptdumptds_check+617 ( @ 0)</avrf:trace>
<avrf:trace>OCI!lpminit+8 ( @ 0)</avrf:trace>
<avrf:trace>SQORA32!SQLTablesW+36a ( @ 0)</avrf:trace>
<avrf:trace>SQORA32!SQLTablesW+766 ( @ 0)</avrf:trace>
<avrf:trace>verifier!+728fc66d ( @ 0)</avrf:trace>
<avrf:trace>vrfcore!VerifierTlsSetValue+431 ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+c55 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!RtlQueryEnvironmentVariable+241 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+b4d ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrResSearchResource+a10 ( @ 0)</avrf:trace>
<avrf:trace>ntdll!LdrLoadDll+7b ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!VerifierDisableFaultInjectionExclusionRange+1087 ( @ 0)</avrf:trace>
<avrf:trace>KERNELBASE!LoadLibraryExW+1f1 ( @ 0)</avrf:trace>
<avrf:trace>ODBC32!VFreeErrors+2ff5 ( @ 0)</avrf:trace>
<avrf:trace>ODBC32!SQLDisconnect+593 ( @ 0)</avrf:trace>
<avrf:trace>ODBC32!SQLDisconnect+6f4 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+1933 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+1492 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+e7f ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+d29 ( @ 0)</avrf:trace>
<avrf:trace>MSRDO20!DllGetClassObject+c72 ( @ 0)</avrf:trace>
</avrf:stackTrace>
</avrf:logEntry>
</avrf:logSession>
</avrf:logfile>
Does anyone have any idea what is going on and how this can be resolved? Moving to different technologies is not an option because there is too much code involved.
Many thanks.