Zeke
Fri Jul 02 02:54:31 CDT 2004
When you register an EXE as a COM server you need to use a different syntax.
Instead of running regsvr32 you run your server exe with the switch
/regserver. To unregister use /unregserver. The following is copied from the
help system:
Registering an Automation Server
Your Automation servers are available to other applications once the servers
have been added to the Windows Registry. When you build an Automation
server, it's automatically registered on the build machine. You can also
register your servers on other machines.
When you use the Visual FoxPro Setup to create setup disks, the setup
program registers your servers on your customers' machines. You can also
manually register servers.
To register an .exe component
a.. Run the .exe file with the /regserver switch.
For example, to register Myserver.exe, run the following command:
myserver /regserverTo remove an .exe component registry entry
a.. Run the .exe file with the /unregserver switch.
For example, to unregister Myserver.exe, run the following command:
myserver /unregserverTo register a .dll component
a.. Run REGSVR32 with the name of the server.
For example, to register Myserver.dll run the following command:
REGSVR32 myserver.dllTo remove a .dll component registry entry
a.. Run REGSVR32 with the name of the server and the /u switch.
For example, to register Myserver.dll run the following command:
REGSVR32 /u myserver.dllNote The registry contains the full path name to
the file, so if you move the file, you'll need to register it again.
"Kervin Lo" <kwlo@siksikyuen.org.hk> wrote in message
news:%23gtC352XEHA.2500@TK2MSFTNGP09.phx.gbl...
> Hi, all
>
> I have tried like that
>
> DEFINE CLASS cPerson AS Custom OLEPUBLIC
> test=SPACE(10)
> PROCEDURE Init
> this.test="start"
> ENDPROC
>
> FUNCTION FullName
> RETURN this.test
> ENDPROC
>
> ENDDEFINE
>
> Then Compile to comdata.dll, and try the follow code, but it prompt
> "COMDATA.CPERSON" not found,
>
> a=CREATEOBJECT("comdata.cPerson")
> ? a.test
> ? a.FullName()
> a.release
>
> I tried to Compile the DLL name same as the project name, it can
> createobject successful, but it cannot find the "a.test".
> I don't know why, I am using VFP8
>
> BTW, I compiled to a exe, but it is not allow to regsvr32, it prompt not
> entry point.
>
> Thanks
> Kervin
>
>
> "Alex Feldstein" <nyrks@Kzicf.bet>
> ???????:utm7e0ppiftavr0kuhugi6u5e2n5kmb6nt@4ax.com...
> > On Thu, 1 Jul 2004 16:09:34 +0800, "Kervin Lo"
> > <kwlo@siksikyuen.org.hk> wrote:
> >
> > >Do anyone have a sample for write a OLE Object?
> > >I need to create a object call by VBSCRIPT to display a report in
client
> > >side.
> >
> >
> > Kervin
> >
> > It all depends on what you generically call an "ole object".
> >
> > If you mean an ActiveX control. No. VFP cannot create ActiveX
> > controls. Can read them, can subclass and modify them but cannot
> > create them.
> >
> > If what you mean is a COM object, then it is fairly easy using the
> > OLEPUBLIC modifier.
> >
> > See examples in the Fox Wiki:
> >
http://fox.wikis.com/wc.dll?Wiki~COMComponentExample
> >
> > Your message is not very clar on what you need to do. Do you mean you
> > plan to use VBS in an ASP page to display a Fox report (FRX)?
> >
> > You cannot display an FRX outside of VFP as the non-VFP client does
> > not understand the format. What is normally done in those cases is
> > onverting it to another format. The most common is by printing it to a
> > PDF writer and exporting it (or sending it through HTTP to a browser)
> > as PDF.
> >
> > HTH
> >
> >
> >
> >
> > Alex Feldstein
> > ________________________________
> > Microsoft Visual FoxPro MVP
> > Please respond in the public groups so that everybody
> > can benefit from the exchange.
> > Favor de responder en los foros públicos asi todos se benefician.
> > (Address scrambled with ROT-13)
>
>