Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing output from ActiveX control event programatica
Message
De
12/05/1998 12:35:31
Donny Sims
Independent Computer Consultants Inc
Scottsboro, Alabama, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00098174
Message ID:
00098795
Vues:
33
David

First, let me apologise for not acknowledging you reply more quickly, things got crazy here last Friday eveing. I finally got a chance to try your code last night (while waiting for the second new hard disk in our server to load). I've included my code below, the lcString variable contains only spaces at every checkpoint. Am I doing something wrong? In searching the v3 docs I could find no references to using the @ token for passing variables by reference to OLE or ActiveX controls ( only for UDF's and DLL's ), do you think I may need to upgrade to v5 to get this to work ?

Thanks for your help

>Donny,
>
>LPCTSTR - Long Pointer to a Constant TStr, basically a pointer to a string. So in VFP you'd use @lcString to send the function the address of your string, which should have enough space already allocated to hold the return value:
>
>local lcString
>lcString = space( 1024 )
>SMTPForm.Session1.Response( @lcString )
>? lcString
>
My revised code:
SMTPForm = CREATEOBJECT("form")
SMTPForm.addobject("Session1","olecontrol","SMTP.SmtpCtrl.1")

WITH SMTPForm.Session1
.DestinationAddress = "everyone@acme.com"
.Domain = "acme.com"
.MailData = "This is a mailmessage"
.SmtpServerIP = "192.168.0.1"
.SourceAddress = "admin@acme.com"
.SourceMailer = "ESEsSmtp1 test-mailer"
.SourceName = "Donny Sims"
.Subject = "Test of SMTP mail from foxpro"
ENDWITH

private lcString
lcString = space( 1024 )
SMTPForm.Session1.Response( @lcString )
? lcString
SMTPForm.Session1.Sendmail
? lcString
SMTPForm.Session1.Response( @lcString )
? lcString
Donny Sims

Life is what happens to us while were busy making other plans.
- John Lennon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform