News
: SMF - Just Installed!
Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
May 17, 2012, 06:06:00 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
« previous
next »
Pages: [
1
]
Go Down
Print
Author
Topic: Newbie ... Using OTL on a DLL with VCL component and callback. (Read 319 times)
TrajanoCosta
Newbie
Posts: 2
Newbie ... Using OTL on a DLL with VCL component and callback.
«
on:
January 10, 2012, 08:47:30 PM »
Hi all. I am new in OTL and multithreading.
I want to create a dll with a vcl component to capture frames from the webcam. In the dll I create the instance of visual component and assign a callback funtion for the event in frame captures.
Something like this:
type tframegrabberevent = procedure (bmp : Tbitmap); stdcall;
var FG : TFrameGrabber;
Fframe : tframegrabberevent
...
FG := TFrameGrabber.create(nil);
FG.onframegrabber = Fframe.
When a call the dll from a application I assign the Fframe to a function in the application to receive the bitmap!
That's all
My question is: Can I use OTL to start the process in dll in a multitask way, in a thread different of application? and yet communicate a function address (callback) betwen app and dll?
I thank to all for any response.
Logged
Primoz Gabrijelcic
Administrator
Hero Member
Posts: 569
Re: Newbie ... Using OTL on a DLL with VCL component and callback.
«
Reply #1 on:
January 11, 2012, 01:53:06 AM »
Sorry, you got me there - I've never used OTL in a DLL.
A short answer would be - if a TThread-based version would work in you scenario, OTL-based version should also work as they use identical mechanisms.
Logged
TrajanoCosta
Newbie
Posts: 2
Re: Newbie ... Using OTL on a DLL with VCL component and callback.
«
Reply #2 on:
January 11, 2012, 02:18:13 PM »
I will try and post the results here.
Thank you!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
OmniThreadLibrary forum
>
OmniThreadLibrary
>
General Discussions
>
Newbie ... Using OTL on a DLL with VCL component and callback.
Loading...