Microsoft KB Archive/318969

= FIX: Second Instance of STDLL Object Causes Exception Error =

Article ID: 318969

Article Last Modified on 5/1/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q318969



SYMPTOMS
If you run Visual FoxPro 7.0 on a computer with the locale set to a non-English language that has a corresponding Visual FoxPro run-time file, and you use the CreateObject function to create two instances of a single-threaded DLL that was created with Visual FoxPro, you receive the following error message after Visual FoxPro creates the second instance of single-threaded DLL:

Fatal exception: Exception code: C0000005

This error might not occur if Vfp7renu.dll is in the VFP7 home directory or the default directory.



RESOLUTION
To resolve this problem, obtain the latest service pack for Visual FoxPro for Windows 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack



STATUS
Microsoft has confirmed that this is a problem in Microsoft Visual FoxPro for Windows 7.0.

This problem was first corrected in Visual FoxPro for Windows 7.0 Service Pack 1.



Steps to Reproduce the Behavior
The following steps reproduce the problem when you use the German locale. This problem occurs in any non-English language that has its own localized run-time files.  Configure the German locale on your computer. Make sure that this is the default locale for the operating system.  Paste the following code in a program (.prg) file, and then run the program from the Command window: Set Safety off StrToFile( &quot;Define Class ClsA as Custom OlePublic&quot;+Chr(13)+&quot;Enddefine&quot;, ;   &quot;b010828_1a.Prg&quot; ;  ) Build Project b010828_1a from b010828_1a.Prg Build Dll b010828_1a from b010828_1a StrToFile( &quot;Define Class ClsB as Custom OlePublic&quot;+Chr(13)+&quot;Enddefine&quot;, ;   &quot;b010828_1b.Prg&quot; ;  ) Build Project b010828_1b from b010828_1b.Prg Build Dll b010828_1b from b010828_1b oRefA = CreateObject(&quot;b010828_1a.ClsA&quot;) oRefB = CreateObject(&quot;b010828_1b.ClsB&quot;) RETURN 

Note that you receive the error that is described in the &quot;Symptoms&quot; section, and Visual FoxPro quits.

To remove the entries that are placed in the Windows registry by steps 1 and 2, run the following code from the Command window: CD  DECLARE INTEGER DllUnregisterServer in b010828_1a.dll ? DllUnregisterServer CLEAR DLLS DllUnregisterServer

DECLARE INTEGER DllUnregisterServer in b010828_1b.dll ? DllUnregisterServer CLEAR DLLS DllUnregisterServer

Additional query words: crash

Keywords: kbbug kbfix kbvfp700sp1fix kbcodesnippet KB318969

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.