>>Hello Everyone,
>>
>>Can anyone get this to work? If I can get past this code I'll be able to finish the rest (I think) myself.
>>
>>Thanks in advance...
>>
>>
>>CLEAR
>>
>>PUBLIC oComUtil, oFoxEvent, oMSMQEvent
>>
>>* Setup up event handler to receive the messages
>>oMSMQEvent = create("msmq.msmqevent")
>>oComUtil = create("vfpcom.comutil")
>>oFoxEvents = create("FoxEvent")
>>
>>? EVENTHANDLER(oMSMQEvent,oFoxEvent)
>>
>>
>>DEFINE CLASS FoxEvent AS custom OLEPUBLIC
>> IMPLEMENTS FoxEvents IN "MSMQ.Msmqevent"
>>
>> Procedure FoxEvents_Arrived(oQueue,Cursor)
>> WAIT WINDOW "Message Arrived" TIMEOUT 1
>> ENDPROC
>>
>> Procedure FoxEvents_ArrivedError(Queue,ErrorCode,Cursor)
>> WAIT WINDOW "Message Arrived Error" TIMEOUT 1
>> ENDPROC
>>
>>ENDDEFINE
>>
>
>Is that all the events in FoxEvents? A class that implements an interface has to have methods for every event in the interface, even if they do nothing.
>
>Tamar
The problem begins for me with >oMSMQEvent = create("msmq.msmqevent"), which creates an empty class. When I tried the example from MS Office Automation w/VFP Pg pg 363, .ExportEvents(), MSMQ_Events.prg never gets created.
oVFPCOM = CREATEOBJECT("vfpcom.comutil")
oMSMQ = CREATEOBJECT("MSMQ.MSMQEvent")
oVfpCom.ExportEvents(oMSMQ, "MSMQ_Events.prg")