Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inconsistent Execution Between stand alone DLL and via IDE
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Inconsistent Execution Between stand alone DLL and via IDE
Miscellaneous
Thread ID:
00593606
Message ID:
00593606
Views:
60
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
Map
View

Click here to load this message in the networking platform