define class myClass as Session OLEPUBLIC procedure myEventA() as void * The code of this method endproc procedure myEventB() as void * The code of this method endproc enddefineImagine that prg is in a project called myCOM, which compiled will allow you to use CreateObject('myCOM.myClass') and also imagine that it was not your code, some third party just like the WinsockControlEvents. Now you want to do some job each time those Events are raised, so you need a way to say 'Hey, please Mr MyClass, can you let me know when you fire the Events A or B?', the answer would be 'sure! just create some methods in your class and I will call them when I run mine', of course, you need a way to tell MyClass which method to call for each event, right?
procedure myEventA() as void * The code of this method * Looks around for people interested in what I have to say... oh, there is Jay Jay.myEventA() endprocBut, how can myClass be sure that Jay.myEventA() is a valid method? Well, that is the reason why the compiler forces you to write code in your class for each event.
* some other classes we are interested on, we probably only know the interface, like in your case define class myClass as Session OLEPUBLIC procedure myEventA() as void * The code of this method * Will call theClass.myClass_myEventA() endproc procedure myEventB() as void * The code of this method * Will call theClass.myClass_myEventB() endproc enddefine define class myOtherClass as Session OLEPUBLIC procedure myEventA() as void * The code of this method * Will call theClass.myOtherClass_myEventA() endproc procedure myEventB() as void * The code of this method * Will call theClass.myOtherClass_myEventB() endproc enddefine * Your class define class theClass as Session OLEPUBLIC implements myCOM.myClass implements myCOM.myOtherClass procedure myClass_myEventA() as void * Code to be run whenever myEventA of myClass is raised endproc procedure myClass_myEventB() as void * Code to be run whenever myEventB of myClass is raised endproc procedure myOtherClass_myEventA() as void * Code to be run whenever myEventA of myOtherClass is raised endproc procedure myOtherClass_myEventB() as void * Code to be run whenever myEventB of myOtherClass is raised endproc enddefineSO, I hope that explains why you need the DMSWinsockControlEvents_ prefix for your methods, the last thing I need to mention is you use EVENTHANDLER as a way of telling the class(es) you are implementing that they need to make the calls to your object.