Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Translation from VB to VFP
Message
From
28/10/2005 16:58:12
 
 
To
28/10/2005 10:14:40
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01062354
Message ID:
01063161
Views:
14
Thanks,

let me just confirm that I am following your instructions properly:

1. Opened Object Browser
2. Opened the type library for the com object
3. Clicked on the name of the library in the tree view in the browser
4. Copied the guid from the information display at the bottom of th eobject browser
5. Ran regedt32 and did a find for the guid.
6. This displayed a typelib and 2 entries above that a progid.
7. Copied the data from the progid ("Netrics.Netrics.1") to the command window and did a ox = createobject("Netrics.Netrics.1").
8. This worked, to an extent.
9. I also did oxDB = CREATEOBJECT("netrics.database.1")
10. Then oxDB.Name = "Test"
11. then I get the error OLE error code 0x8002801d: Library not registered.

Did I do the right thing?

>OK, click on the NetricsLib branch in the o.browser and notice the guid and file name (dll) at the bottom. Find this in the registry looking for a key called "ProgID" associated with the entry.
>
>If it's there look at the data for it, you should be able to CreateObject this. If it's not there then maybe the library cannot be used this way.
>
>>Thanks, I forgot about the Object Browser (I'm using VFP9). Now if I can only make sense of what I am seeing. I found the Netrics stuff and opened it. It displays as NETRICSLib and it has a class called Netrics.
>>
>>I tried ox = createobject("Netricslib.netrics") and get the error about the class definition not being found.
>>
>>It seems the vendors are able to duplicate my problems (but not consistently) so it is apparently some problem with the library, but wish I could make more sense of it.
>>
>>>It sounds like you have VFP7 or newer, why don't you check the Tools->Object browser->COM libraries?
>>>
>>>If you can find it you should be able to identify the callable classes.
>>>
>>>>Hey Borislav,
>>>>
>>>>I'm still having some problems! :(
>>>>
>>>>If I do
>>>>
>>>>loNetrics = createobject("netrics.netrics")
>>>>
>>>>I can then get the intellisense working when I type loNetrics. in the command window, but I get an error when trying to execute the command:
>>>>
>>>>OLE error code 0x8002801d: Library not registered.
>>>>
>>>>Stranger still, if I create a PRG and declare this:
>>>>
>>>>LOCAL loNetrics as
>>>>
>>>>I get intellisense showing NetricsLib in the list!
>>>>
>>>>Now I'm completely confused.
>>>>
>>>>Thanks for any help you (or anyone else) can offer.
>>>>
>>>>
>>>>>>Found the Netrics keys in the registry (using Regedt32, not regsvr32 :)).
>>>>>>
>>>>>>What do you mean by "check the whole key"? Do you mean the CLSID? What do I do with it?
>>>>>>
>>>>>>Just in case this makes any difference, the com objects are supposed tobe in a DLL, which is what was registered on the PC.
>>>>>>
>>>>>>Thanks.
>>>>>>
>>>>>>>OK,
>>>>>>>Open registry with regsvr32. Open HKEY_CLASSES_ROOT and search for SearchOpts. If you found it check whole key.
>>>>>
>>>>>
>>>>>No, not CLSID. I mean the Text in the Node of the treeview that is above CLSID node :-)
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform