Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Beginner COM question
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00233507
Message ID:
00233523
Views:
28
> I've seen plenty of examples of VFP developed COM
> components which simply return a value. That's
> straightforward. But how can I accomplish the following
> example?
>
> My VFP app calls an out of process COM component (developed
> in VFP6) which SCANs through a large table and does a bunch
> of processing. This will be time consuming, so I want to
> display a thermometer bar on the UI to show its progress
> for the end user. The COM component is out of process and
> I know that it cannot display any UI, so what's the best
> way to make the calling process provide a thermometer bar?
>
> Thanks in advance, John Tappero

Hi, John. Have you tried something like this:

-------------------- begin example:

[from yourApp]

_ _ ox = create( 'outOfProcessComComponent' )
_ _ ox.bigScan( this )

[now, inside the COM component's bigScan() method]

_ _ lparameters toCallingApp
_ _ scan
_ _ _ _ * do some processing here
_ _ _ _ if [someIntervalToUpdateHasBeenReached]
_ _ _ _ _ _ toCallingApp.UpdateTherm( lnSomePercent )
_ _ _ _ endif
_ _ endscan

-------------------- end example.

Unless there is some reason that the COM component cannot
invoke a public method in your callingApp, having received
an object reference to it in the bigScan's lparamter, I think
the approach above should do the trick (I'm relatively new in
the things of COM myself so it's very possible that there *IS*
some reason that the COMponent cannot invoke a public method
of the callingApp and I'm just unaware of that reason =)

Good luck, and let us know how you make out (specifically,
please email me and let me know if the above approach works
or not).

Thanks.
--
Richard Harlos
r_harlos AT yahoo DOT com
Previous
Reply
Map
View

Click here to load this message in the networking platform