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
De
12/08/2004 16:25:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00930276
Message ID:
00932934
Vues:
25
Christof,

May I ask you one more question?

I made a small app that sends those messages (using this routine). Why some users don't get an error but the messages they send doesn't arrive to the destination?

Regards,

Fernando

UPDATED (08.13.04): Never mind, just figured out what happened. In the line:
  lnHandle = FCreate("\\"+m.tcTarget+"\MailSlot\Messngr")
The variable tcTarget had blanks at right, when I alltrimed them it worked ok. What puzzles me is when I was sending from my PC it worked, from many other users it didn't. The only explanation I found (guessed) is that I'm running Win XP and the other Win2K. Who knows...

Have a nice week end!

Fernando

>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform