Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Binding Messenger COM-object
I'm using following code to bind VFP8 to MSN Messenger :
PUBLIC loVFPCOM,loOutlook,loLink
loVFPCOM = CREATEOBJECT("VFPCOM.COMUTIL")
loOutlook = CREATEOBJECT("Messenger.UIAutomation.1")
loLink = CREATEOBJECT("MessengerApplicationEvents")
loVFPCOM.BindEvents(loOutlook,loLink)
DEFINE CLASS MessengerApplicationEvents as Custom
PROCEDURE OnAppShutDown()
MESSAGEBOX("Close MSN")
ENDPROC
PROCEDURE OnTextReceived(plMSession, pSourceUser, bstrMsgHeader, bstrMsgText, pfEnableDefault)
MESSAGEBOX("User receives message")
ENDPROC
ENDDEFINE
When running this code I get 'Unknown COM status code'. I got the method 'OnTextReceived' and 'OnAppShutDown' from the object browser of the 'Messenger 1.0 Type Library'...
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement