Search the web
Sign In
New User? Sign Up
ace-users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[ace-users] Re: Need explanation about ACE Task / Thread   Message List  
Reply | Forward Message #42963 of 42992 |
Hi Christian,

>> Please, I need explanation about ACE Task and ACE ThreadManager,
>>
>> ACE VERSION: 5.2

Wow, that's a REALLY old version of ACE. I recommend that you upgrade
to ACE+TAO x.4.7, which you can download from

http://deuce.doc.wustl.edu/Download.html

under the heading "latest beta kit".

>> PC Pentium 4 3.2Ghz - Windows XP Pro
>> Visual C++ 6.0 sp6
>>
>> A little example to explain my problem :
>>
>> class Task : public ACE_Task_Base
>> {
>> ...
>> int open (void *args=0)
>> {
>> return activate ();
>> }
>> ....
>> int svc (void)
>> {
>> // INIT : create apps window
>> //********************************
>> WNDCLASS wndclass;
>> HINSTANCE hInst;
>> hInst = NULL;
>> // Register display window class
>> ...
>> ::RegisterClass (&wndclass) ;
>> ...
>> m_hWndMain = ::CreateWindow ("name", str, WS_OVERLAPPEDWINDOW,
>> atx, aty, vsize, hsize, NULL, NULL, hInst, NULL);
>> ....
>>
>> // LOOP
>> //*********
>> while ( ) {
>> ...
>> if (::GetMessage( &msg, NULL, 0, 0 )) <= 0) {
>> return -1;
>> }
>> ...
>> };
>> ...
>> return 0;
>> }
>> ...
>> }
>>
>> In fact, if I take out the Init part of the svc () method
>> and I put in the init method (for exemple in open () method ),
>> the thread doesn't work !
>>
>> Someone could tell me why ???

I think Windows stores the windows information in thread-specific
storage, so you need to make sure that the thread you use t initialize
the window is the same one you use to process of messages.

Take care,

Doug
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Institute for Software Integrated Systems WEB:
www.dre.vanderbilt.edu/~schmidt
Vanderbilt University, Nashville TN, 37203 NET: d.schmidt@...



Thu Oct 6, 2005 6:55 pm

schmidt@...
Send Email Send Email

Forward
Message #42963 of 42992 |
Expand Messages Author Sort by Date

Hi Christian, ... Wow, that's a REALLY old version of ACE. I recommend that you upgrade to ACE+TAO x.4.7, which you can download from ...
Douglas C. Schmidt
schmidt@...
Send Email
Oct 6, 2005
7:14 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help