Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - WTL Multi-Thread
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WTL Multi-Thread

 Post Reply Post Reply
Author
Message
RobertJ View Drop Down
Newbie
Newbie


Joined: 09 February 2008
Location: France
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote RobertJ Quote  Post ReplyReply Direct Link To This Post Topic: WTL Multi-Thread
    Posted: 23 September 2010 at 4:29am
Hi,

I use codejock Suite Pro in a program written in WTL Multi-Thread.
In the main thread of the application, everything works well, but I use threads in which I would use the TaskDialog, but I cannot instantiate _DTaskDialog, I get an error: E_NOINTERFACE.

Any ideas?

My Sample:

DWORD MyThread ( ... )
{
      HRESULT hr = CoInitializeEx ( NULL, COINIT_APARTMENTTHREADED ) ;

      OLECHAR szGuid[128] ;
      StringFromGUID2 ( __uuidof ( XtremeSuiteControls::TaskDialog ), ( LPOLESTR ) szGuid, sizeof ( szGuid ) ) ;

      CRect rcDefault ;

      // ------ Create Task Dialog -----
      CComPtr<IUnknown> spControl ;
      CAxWindow AxTaskDialog ;
      AxTaskDialog.Create ( hWnd, &rcDefault, szGuid, WS_CHILD | WS_VISIBLE  ) ;

      hr = AxTaskDialog.QueryControl ( &spControl ) ;
      CComPtr<XtremeSuiteControls::_DTaskDialog> pITaskDialog ;
      hr = spControl->QueryInterface ( __uuidof ( XtremeSuiteControls::_DTaskDialog ), ( LPVOID * ) &pITaskDialog ) ;

      // hr = E_NOINTERFACE
}

Thanks
Robert

Coodejock v.13.1.0 (ActiveX) 
Windows 7 Integral

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.