Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alerting User of an overdue task from VFP app to the Net
Message
 
À
03/08/2004 13:23:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00930276
Message ID:
00930439
Vues:
27
Hi Fernando,

>Congratullations for your recente marriage, to you and your lucky wife!

Thank you!

>Does CreateFile has something to do with FOpen() or FCreate(), WriteFile with FWrite() or FPuts() and CloseHandle with FClose() ?

Yes, when you call one of the VFP functions, VFP itself calls these API functions. However, because VFP uses different flags that do not work with mailslots on Windows 9x, I use the API functions here. On a Windows NT based system, you can use VFP functions alternatively:
*========================================================
* Send a message to a computer. Same as NET SEND.
*========================================================
Procedure SendMsg
LParameter tcTarget, tcSender, tcReceipient, tcMessage

  Local lnHandle, llOK
  lnHandle = FCreate("\\"+m.tcTarget+"\MailSlot\Messngr")
  If m.lnHandle == -1
    llOK = .F.
  Else
    FWrite( m.lnHandle, ;
      m.tcSender + Chr(0) + ;
      m.tcReceipient + Chr(0) + ;
      m.tcMessage+Chr(0) ;
    )
    FClose( m.lnHandle )
    llOK = .T.
  Endif
  
Return m.llOK
--
Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform