Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
CreateObject but not GetObject (Read 1808 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
CreateObject but not GetObject
02.11.09 at 11:29:20
 
CreateObject but not GetObject
 
Had some "fun" with CreateObject and GetObject in VB6. GetObject fails (error 429). The class I am creating is a VB6 COM dll or COM exe.
 
Code:
Private Sub Form_Load()
  Dim obj As Object
  Dim obj1 As Object
  
  Set obj = CreateObject("Project1.Class1")
  Set obj1 = GetObject(, "Project1.Class1")
End Sub
 


 
Aparently a COM object does not register itself in the so called Running Objects Table (ROT). GetObjects looks in this table to get the object and can't find the entry.
 
See this post how to register an object from an ActiveX dll into the ROT
VB6 ActiveX EXE Problem  
http://discuss.fogcreek.com/joelonsoftware2/default.asp?cmd=show&ixPost=3750 4&ixReplies=3
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1