Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SMTP code not working
Message
De
14/06/2005 10:42:44
 
 
À
14/06/2005 10:38:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Divers
Thread ID:
01023121
Message ID:
01023127
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
>Hi, All
>
> I found code for calling the SMTP server for sending email. But when I try to run the code, this line errors out:
>
>    lResult = (ws_connect(THIS.hSocket, @cBuffer, LEN(cBuffer))=0)
>
>
>The error is: "Cannot find Entry Point CONNECT in the DLL"
>
>Here is the init that sets this up:
>
>  PROCEDURE INIT()
>    DECLARE INTEGER gethostbyname IN ws2_32 STRING HOST
>    DECLARE STRING inet_ntoa IN ws2_32 INTEGER in_addr
>    DECLARE INTEGER socket IN ws2_32 INTEGER af, INTEGER tp, INTEGER pt
>    DECLARE INTEGER closesocket IN ws2_32 INTEGER s
>    DECLARE INTEGER WSACreateEvent IN ws2_32
>    DECLARE INTEGER WSACloseEvent IN ws2_32 INTEGER hEvent
>    DECLARE GetSystemTime IN kernel32 STRING @lpSystemTime
>    DECLARE INTEGER inet_addr IN ws2_32 STRING cp
>    DECLARE INTEGER htons IN ws2_32 INTEGER hostshort
>    DECLARE INTEGER WSAStartup IN ws2_32 INTEGER wVerRq, STRING lpWSAData
>    DECLARE INTEGER WSACleanup IN ws2_32
>
>    DECLARE INTEGER CONNECT IN ws2_32 AS ws_connect ;
>      INTEGER s, STRING @sname, INTEGER namelen
>
>    DECLARE INTEGER SEND IN ws2_32;
>      INTEGER s, STRING @buf, INTEGER buflen, INTEGER flags
>
>    DECLARE INTEGER recv IN ws2_32;
>      INTEGER s, STRING @buf, INTEGER buflen, INTEGER flags
>
>    DECLARE INTEGER WSAEventSelect IN ws2_32;
>      INTEGER s, INTEGER hEventObject, INTEGER lNetworkEvents
>
>    DECLARE INTEGER WSAWaitForMultipleEvents IN ws2_32;
>      INTEGER cEvents, INTEGER @lphEvents, INTEGER fWaitAll,;
>      INTEGER dwTimeout, INTEGER fAlertable
>
>    DECLARE RtlMoveMemory IN kernel32 AS CopyMemory;
>      STRING @DEST, INTEGER Src, INTEGER nLength
>
>
>Does anyone know why this would be happening? Is it because I am using VFP6 instead of 8 or 9?
>
>Thanks,
>Beth

Beth,

use lower case connect. And also for send. The name of the entries is case sensitive
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform