CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: Date Entered: 9/21/2007 8:50:26 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 3 Views: 804 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
"simon sam" <>
NewsGroup User
Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 800040059/21/2007 8:50:26 AM

0

hi all

I?m developing a web application using VS.Net 2005 language VB. In my application I?m creating an instance of a dll file created in visual fox pro 9.0. In the beginning everything was working properly. After a while each time I open a page, create a document, quit the page and reopen it I get the error:

Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 80004005.

I was using this code each time I need to save a document:

 

 (in the main page)

Dim DocDll As New Docvbdll.Doc_VbDll    ->this is not the Fox Dll

?

 Public Sub save_doc()        Dim docNum As String       

docNum = DocDll1.document_save(Doc_num)

??? (in the dll I used)Public Function document_save (ByVal As Doc_num Integer) as string     

??

Dim dllFox As New common_Fox.Doc_COMMON_Fox

??

 

So I moved this "Dim dllFox As New common_Fox.Doc_COMMON_Fox" from the "document_save" to the loading of the web page. Now in the main page I have the following:

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load            If Not IsPostBack Then            Dim dllFox As New common_Fox.Doc_COMMON_Fox    ->this is the Fox Dll                  ??                  End If 

But this did not solve my problem

So plz can someone tell me what?s making the error and how to solve it?

 


Regards,
Simon Sam.
"rajasekar_svk"
NewsGroup User
Re: Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 800040059/22/2007 8:57:07 AM

0

Hai Simon:
I am also having the same problem using the FoxPro DLL in VS 2005. I have used this DLL in my web service. I got the same issue. For avoid this error the following code should works,

Public Class Service
Private Shared proDllMethod As pro2pda.pro2pda
Private Shared dllInitialize As Boolean = False
  Public Sub New()
          If dllInitialize = False Then proDllMethod = New pro2pda.pro2pda : dllInitialize = True
  End Sub
End Class

But this is a temporary solution for me. I need to get the better approach for this.

Regards,

Rajasekar Nammalvar

"simon sam" <>
NewsGroup User
Re: Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 800040059/25/2007 6:48:11 AM

0

This code did not solve the problem but because of it i knew what makes my page act like this:The problem is that in the fox dll I?m using public variables and I?m asking the page to read values from iti think that the VS dll I created cannot read public values from Fox ( at least this is what i think )So please try this and please tell me if it worked or not

I?m waiting for your message

And thank u for your help 

 


Regards,
Simon Sam.
"rajasekar_svk"
NewsGroup User
Re: Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 800040059/25/2007 8:00:02 AM

0

You can't read the public variables from FoxPro DLL. You have to set the Properties in DLL. Then it works.

 

4 Items, 1 Pages 1 |< << Go >> >|




   
  Privacy | Contact Us
All Times Are GMT