Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does a COM server know which client Fn to call back
Message
De
24/12/2000 16:25:07
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00456181
Message ID:
00456705
Vues:
22
>>>>What I need to know is if not called as above, HOW WILL THE COM SERVER KNOW WHICH METHOD TO CALL INTO THE CLIENT TO INTERRUPT IT, WHEN IT DOES RECEIVE A WEIGHT.
>>>
>>>It almost seems that two values would need to be returned. One would be a pointer to a method, and the other a weight value. There is another VFP guy called AutoYield - but you have probably already considered him.
>>
>>VFP doesn't support call backs, so a pointer to a method will not work. The closest thing to do what Bernard needs is a COM server that raises an event, and the VFP client can bind to that using VFPCOM.
>What if the COM has a property that has a character or numeric value.
>defin class mycom as custom
>ReturnPointer=1 && Or some othe value assigned in process
>procedure GetReturnPointer
>return this.ReturnPointer
>endproc
>enddef
>
>- AT the client
>oMyCom=createobject('MyCom')
>if oMyCom.GetReturnPointer()=1
> do Process_1
>endif
>
>Why couldn't the client use a value requested from the server to point to a local process?

That's not quite how a call back works, nor does it accomplish the same thing. There are many methods for a server process to determine what code the client runs, but allowing the server process to actually invoke the routine is what's needed. Your code sample simply invokes a synchronous method in the server and uses the return value to decide which procedure to call, but does nothing to determine when it should run.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform