This article has been archived. It is offered "as is" and will no longer be updated.
A Component Object Model (COM) multithreaded DLL (MTDLL) is built by using Microsoft Visual FoxPro (VFP) version 8.0 (184.108.40.2061). The DLL contains two OLEPUBLIC server definitions. The DLL is added to a COM+ package. When you call a method of the second server from an instance of the first server, you receive the following error message:
"OLE error code 0x80020006: Unknown name."
This error might not occur on a computer that is running Microsoft Windows XP Service Pack 2 (SP2) or Windows Server 2003.
To resolve this problem, install Visual FoxPro 8.0 Service Pack 1.For more information, click the following article number to view the article in the Microsoft Knowledge Base:
829988 How to obtain the latest Visual FoxPro 8.0 service pack
To work around this problem, create separate COM servers, and use COM+ packages for each server.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.This problem was corrected in Microsoft Visual FoxPro 8.0 Service Pack 1.
Steps to reproduce the behavior
Start Visual FoxPro 8.0, paste the following code in a .prg file, and then run the program to create the COM server.
CLEAR CLEAR ALL DELETE FILE errortest1.pjxDELETE FILE errortest1.exeDELETE FILE errortest1.dllCREATE PROJECT errortest1 nowaTEXT TO lcText NOSHOWDEFINE CLASS ComServer1 AS Session OLEPUBLIC PROCEDURE ReturnHello1() AS String RETURN "Hello1"ENDDEFINEDEFINE CLASS ComServer2 AS Session OLEPUBLIC PROCEDURE ReturnHello2() AS String RETURN "Hello2" PROCEDURE ReturnHello3() AS String RETURN "Hello3"ENDDEFINEENDTEXT DELETE FILE testxx.prg=STRTOFILE(lcText,'testxx.prg',0)_vfp.ActiveProject.files.add('testxx.prg')_vfp.ActiveProject.Build('errortest1',1)_vfp.ActiveProject.Build('errortest1',5)_vfp.ActiveProject.close
In Control Panel, double-click Administrative Tools, and then double-click Component Services MMC.
Right-click COM+ Application, point to New, and then click Application.
In the COM+ Application Install Wizard, click Next, click Create an empty application, click Server Application, and then type a name for the application.
Click Next to accept all other default settings, and then click Finish.
In the Component Services MMC panel, right-click the component that you just created, point to New, and then click Component.
In the COM+ Component Install Wizard, click Next, click Install new component(s), and then double-click ErrorTest1.Dll.
Click Next to accept the default settings, and then click Finish.
In Visual FoxPro, run the following code in the Command window.