<br><tt><font size=2>Hello,</font></tt>
<br>
<br><tt><font size=2>thanks for this idea but i already tried to cast it.</font></tt>
<br><tt><font size=2>After the explicit casting the error-message switches
to "'overload-function' can't be converted into 'LPTHRAD_START_ROUTINE'"</font></tt>
<br><tt><font size=2>and it cant be found the right function cause of wrong
types.</font></tt>
<br>
<br><tt><font size=2>kind regards</font></tt>
<br><tt><font size=2>Matthias Ritter</font></tt>
<br>
<br>
<br><tt><font size=2>>Hello,<br>
><br>
>> I'm programming an analysing tool for c++ code.<br>
>> I'm using the AspectC++ Add-In for Visual Studio .NET (2003).<br>
>> I tried to weave a thread into the application, starting before
the <br>
>> main-function is executed.<br>
>> The code looks like this:<br>
>> <br>
>> DWORD bar(void* param)<br>
>>                 {<br>
>>                  
      // do something<br>
>>                  
      return 0;<br>
>>                 }<br>
>> <br>
>> advice Main() : before()<br>
>>         {<br>
>>                 myThread
= CreateThread( NULL, 0, bar, (void*)&ThreadArgs, <br>
>> 0, (LPDWORD)&myThreadId );<br>
>>         }<br>
>> <br>
>> Unfortunately the Aspectc++ compiler fails cause he wants to convert
the <br>
>> third parameter from 'DWORD (void*)' into 'LPTHREAD_START_ROUTINE'
!</font></tt>
<br><tt><font size=2>><br>
>I can not reproduce it with the current development version of ac++.
A<br>
>work-around is to explicitly cast bar to LPTHREAD_START_ROUTINE (just<br>
>like everywhere in the VC++ system headers):<br>
><br>
>myThread = CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)bar, ...<br>
><br>
>Regards,<br>
>Matthias</font></tt>