Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multithreading VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00909234
Message ID:
00910569
Vues:
17
Hi Nick,
>
>Callback function is that all it needs,
>I'm sure I have done that before somewhere in an fll.
>Will search for my previous code.
Search dowload area, there is one and then there is another one by Remus R.
for creating COM-Threads AFAIR.
>
>Can I just check I understand this right.
No Prob, but my explanation here is based on the DDE behaviour.
Method signature or Calling actions might differ (for example
setting a "Callback name" in a property in COM), but the principle
is the same.

You have the Main which has opened a DDE-connection to the worker
( a bridge in COM or just the object reference).

On the worker there are some methods defined and made "available" for DDE.

Then the Main calls the worker:
llRetExeDDE = ddeexecute( m.lnDDEChannel, m.lcDDEFunc, m.lcFuncAsyn )
with
m.lnDDEChannel = connection to the other process
m.lcDDEFunc = the function the worker has to process
m.lcFuncAsyn = the function in MAIN wchich will be called directly
after lcDDEFUnc is finished in the worker.
llRetExeDDE will receive just the "notification" that the call was
received (or not, perhaps the other process died), but will work
on asynchronous.

Caveat: m.lcFuncAsyn will be called "interrupt-like" so it can happen
anywhere and anytime. make sure nothing will be switched to get
"intermittent" crashes depending on "where" in the main the interrupt was
triggered.

Final Hint: if you have access to the FPW Docs, read there.
Since this was the way to do things then, it is better documented there.

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform