Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No READ EVENTS in a COM dll
Message
From
25/06/1999 15:02:36
Raul Davila
Davila Programming Services
Toa Alta, Puerto Rico
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
No READ EVENTS in a COM dll
Miscellaneous
Thread ID:
00234103
Message ID:
00234103
Views:
79
Hi:

I made a class based on form that has a MSWinsock control in it.
Using the winsock control I connect to a SMTP server to send emails.
It worked flawlessly until I tried to use it in a COM dll.

When the class is run it calls the Connect() method of the control.
The control's DataArrival event passes the arrived data to a
member procedure of the class which processes the data and responds.

Before this event processing READ EVENTS is called to start waiting
for the DataArrival event of the winsock control.

The problem I'm having is that as soon as the class enters this
iddle state, when ran inside the COM dll, it returns immedieatly.


WEBPROCS.PRG

PROCEDURE SENDEMAIL
PUBLIC HTML_TO_BE_RETURNED

HTML_TO_BE_RETURNED = ''
SET CLASSLIB TO MAILER_LIBRARY
oOBJ = CREATEOBJECT('MAILER')
oOBJ.STARTPROCESS()
RELEASE oOBJ

RETURN HTML_TO_BE_RETURNED



MAILER CLASS:

MAILER.STARTPROCESS

THIS.SOCKCONTROL.OBJECT.CONNECT()
READ EVENTS && inside the COM dll this does nothing!

At this point everything is iddle until the winsock control receives
data and fires the DataArrival event which calls the member procedure MAILER.PROCESSDATA(DATA_ARRIVED)

As soon as the methd returns, WEBPROCS.PRG continues to the next line and releases oOBJ.

I tried to use READ EVENTS but READ EVENTS does not seem to work
inside the COM dll.


If I run the class in a local .exe, READ EVENTS holds the application
until the class finishes and calls CLEAR EVENTS. But this does not work when running as a COM dll.


Any help will be greatly appreciated.

TIA
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico

Still waiting for FoxPro for LINUX
Next
Reply
Map
View

Click here to load this message in the networking platform