Print Page | Close Window

WTL Multi-Thread

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=17304
Printed Date: 04 May 2024 at 2:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WTL Multi-Thread
Posted By: RobertJ
Subject: WTL Multi-Thread
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net