General information
Category:
Coding, syntax & commands
Title:
Inconsistent Execution Between stand alone DLL and via IDE
I have a program which calls an external COM (DLL). The external COM has 7 events that it throws which I must trap. I defined a class (stiievents) which implements the event interface to the external COM. I then have another class that sets up the eventhandler by instantiating the stiievents class.
When I set proc to classprog.prg which contains both class definitions, and manually step through the funcitons in the command window, it works perfectly and I can see all objects in the debugger. When I build a DLL and call the class, FoxPro hangs when the external COM triggers its first event. I also can't see the objects in the debugger because they are now external. I am baffled as to what to do next.
DEFINE CLASS homebase
oEvents = NEWOBJECT('stiievents')
IF EVENTHANDLER(anobject, oEvents)
= anobject.amethod() && Kicks off a process which throws events back to VFP
DO WHILE !oEvents.llComplete
ENDDO
= EVENTHANDLER(anobject, oEvents, .T.)
ENDDEFINE
DEFINE CLASS stiievents AS Session
llComplete = .F.
IMPLEMENTS _IScanningManagerEvents IN 'STIILink.ScanningManager'
PROCEDURE _IScanningManagerEvents_OnSheetAtPrintHead(oSheetOutput AS Object)
This.llComplete = .T. && I've tried no code in this proc as well
ENDPROC
... 6 other procedures for the other events
ENDDEFINE
Any Ideas anyone? What's different about calling vfp classes from a procedure file versus building a DLL and calling it externally?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only