Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating OLE Server
Message
From
24/11/1998 15:36:41
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00161063
Message ID:
00161091
Views:
18
>I have created a class called person as follows:
>
>DEFINE CLASS person AS CUSTOM OLEPUBLIC
> FirstName = SPACE(30)
> LastName = SPACE(45)
>
> PROCEDURE GetName
> RETURN This.FirstName + " " + This.LastName
> ENDPROC
>ENDDEFINE
>
>The above class was part of a prg file in a project (myserver).
>I compiled the project as an OLE DLL and called the dll "myserver.dll"
>
>The dll was placed in C:\WINNT\SYSTEM32 and registered using REGSVR32. The registration process succeeded.
>
>I then created another program called oletest as follows:
>
>oTest = CREATEOBJECT("foxole.person")
>oTest.FirstName = "XXXX"
>oTest.LastName = "YYYY"
>oTest.GetName()
>
>When I run the program oletest, I get the following error on first line:
>
>'Class definition "foxole.person" is not found'
>
>What am I doing wrong? I believe that I have followed all the instruction in the VFP Developers Guide in Chapter 16.
>
>Any help is appreciated...

Just a guess, but it's likely that the OLE server registered with a different ProgID than you expected (foxole.person). It's likely to be registered with the ProgID Myserver.person under HKEY_CLASSES_ROOT; the best thing to do is to look inb the registry if you aren't sure how it registered.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform