Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inconsistent Execution Between stand alone DLL and via I
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00593606
Message ID:
00594849
Views:
21
Jeffrey,
Regarding "What's different about calling vfp classes from a procedure file versus building a DLL and calling it externally" :
With a vfp MTDLL, there is a COM boundary that does not let you share open data and object connections, whereas in a VFP procedure file you, of course, can -giving you total VFP integration with data and objects. Therefore, you probably don't want to put routines in an external VFP MTDLL unless there's some compelling reason to do so..
>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform