0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c++ builder > Datasnap.Win.SConnect.pas > WaitForSingleObject(FTransport.Handle, 180000);

Last updated at Posted at 2015-12-24
動作確認
C++ Builder XE4

Delphi Advent Calender 24日目のyajuさんの記事
http://blogs.wankuma.com/yaju/archive/2015/12/24/524977.aspx

Delphi5の話と思っていたら、XE4でも関連のコードが見つかった。

Program FilesのRadStudioのフォルダにおいて「SConnect.pas」で検索。
Datasnap.Win.SConnect.pasが見つかった。

そのコードに WaitForSingleObject(FTransport.Handle, 180000);がある。

Datasnap.Win.SConnect.pas
...
procedure TStreamedConnection.InternalClose;
begin
  if Assigned(FTransport) then
  begin
    FTransport.OnTerminate := nil;
    FTransport.Terminate;
    PostThreadMessage(FTransport.ThreadID, WM_USER, 0, 0);
    if Assigned(FTransport.FTransport) then
      WaitForSingleObject(FTransport.Handle, 180000);
    FTransport := nil;
  end else
  if Assigned(FTransIntf) then
  begin
    FTransIntf.Connected := False;
    FTransIntf := nil;
  end;
end;
...

しかし、Datasnap.Win.SConnect.pasがどういう時に使われるのか未学習。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?