Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an Out-of-Process COM
Message
De
19/11/2003 15:49:16
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00851628
Message ID:
00851632
Vues:
14
This message has been marked as the solution to the initial question of the thread.
>Hi
>I need to issue a REPORT FORM command from a web service ( a multithreaded dll ). I have been told that the only way to go is to wrap the class with the REPORT command into an Out-Of-Process COM Exe. This sounds really nice, but i don't have a clue as for how to implement.
>
>Thanks all in advance for you help

Simple but not short. Create your class as a COM object, i.e.
define class myprint olepublic as custom
...
procedure PrintThis
_screen.visible=.t.
_screen... {more code to make VFP invisible but to make it think it is - make it small and off
  the visible area, i.e. negative coordinates}
report form ... 
endproc
enddefine
Now build this as an executable, say printing.exe. If it runs on the same server, it will self-register when built, else you have to register it (only once, if you don't change the component GUIDs).

In the calling app, all you have to do is
oPrint=createobject("printing.myprint")
oPrint.PrintThis()
Of course, you may want to pass it some parameters, hide the _screen when done etc.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform