OnUnloadExternalResourceAsync() wanted

F-IN-BOX for Delphi / Builder C++ / VCL
abb
Posts: 21
Joined: Fri Jan 09, 2009 3:32 pm
Location: Russia

OnUnloadExternalResourceAsync() wanted

Postby abb » Thu Apr 30, 2009 12:49 pm

How about to add subj? I'd like to get an information that my previous stream object is freed. It's obvious that it's easy to add such event somewhere near that location:

function TContentManager.CloseFakeHandleAndReleaseStream(Handle: THandle): BOOL;

...............

if Pair.m_Handle = Handle then
begin
>>>>>>>>>>>>>>>>>>>
Here we call OnUnloadExternalStreamAsync(Pair.m_Stream);
>>>>>>>>>>>>>>>>>>>
Pair.Free;
Result := True;
break;
end;

...............

It would be good to have Sender here too, but I didn't investigate your classes too deeply to suggest any solution for that.

Thanks.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Apr 30, 2009 7:05 pm

Thank you for your question.

Look here:

Code: Select all

destructor TFakeHandleStreamPair.Destroy;
begin
   CloseHandle(m_Handle);
   m_Stream.Free;
end;


You can override TYourStream.Destroy to get this notification... Or I've missed something?

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

abb
Posts: 21
Joined: Fri Jan 09, 2009 3:32 pm
Location: Russia

Postby abb » Fri May 01, 2009 5:42 am

Softanics wrote:Thank you for your question.

Look here:

Code: Select all

destructor TFakeHandleStreamPair.Destroy;
begin
   CloseHandle(m_Handle);
   m_Stream.Free;
end;


You can override TYourStream.Destroy to get this notification... Or I've missed something?

Thank you.

No, you didn't. I can agree that subclassing can resolve virtually everything. But I suggested to simplify developer's life. Why don't have "standard" event with "standard" Sender reference rather than to invent something at developer's side? It's easy, so why not to add it?

Thanks.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Sat May 02, 2009 2:47 pm

Please check latest version. We've added this event.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

abb
Posts: 21
Joined: Fri Jan 09, 2009 3:32 pm
Location: Russia

Postby abb » Sat May 02, 2009 9:14 pm

Softanics wrote:Please check latest version. We've added this event.

I'm sorry, but could you tell me, where to get the full version? AFAIR, I got a link from you, but I can't find it now. Or should I make an email request?

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Sun May 03, 2009 7:39 am

I've sent you a letter, please check.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 7 guests

cron