Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Metalib 5.0 SDK 3rd party dll problem
Message
From
07/08/2006 11:16:49
 
 
To
04/08/2006 21:13:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01143139
Message ID:
01143476
Views:
11
This message has been marked as the solution to the initial question of the thread.
I found a solution to this problem. By looking up the CLSID for the class and using CREATEOBJECTEX(), I was able to work around this error.

New test code, (though I could have done this more elegantly)
&& MlReader {14AE4119-AB4D-449D-B41A-6278EDEAFC84}
&& MlWriter {20315AFA-7C65-41BF-98F0-A16DAB307D7E}
oMetalib = createobjectex("{20315AFA-7C65-41BF-98F0-A16DAB307D7E}","","")
cFolder = [All Indexes]
cDir = ADDBS("c:\metastock\"+ALLTRIM(cFolder))
oMetalib.CreateDirectory(cDir)
oMetalib.AppendSecurity([MSFT],[Microsoft],1)
oMetaLib.AppendDataRec(20010721, 0, 123, 200, 100, 123, 3221, 0)
oMetaLib.CloseDirectory()
>I am using VFP v 9.0 sp1 and I can instantiate a metalib object but referencing a method of the object generates the following error:
>
>"OLE error code 0x8002801d: Library not registered."
>
>I have registered the library with regsvr32 and this does not fix the problem. You can see it in the object browser just fine.
>
>code snippet
>
>oMetalib = CREATEOBJECT("Metalib.MLWriter") && works fine and gives a reference
>cFolder = [All Indexes]
>cDir = ADDBS("c:\metastock\"+ALLTRIM(cFolder))
>oMetalib.CreateDirectory(cDir)    && this method call produces the error
>
>
Jim Newsom
IT Director, ICG Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform