<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 10.03.2009, at 11:01, <a href="mailto:Matthias.Ritter@metop.de">Matthias.Ritter@metop.de</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><font size="2" face="sans-serif">Hello,</font> <br> <br><font size="2" face="sans-serif">I'm programming an analysing tool for c++ code.</font> <br><font size="2" face="sans-serif">I'm using the AspectC++ Add-In for Visual Studio .NET (2003).</font> <br><font size="2" face="sans-serif">I tried to weave a thread into the application, starting before the main-function is executed.</font> <br><font size="2" face="sans-serif">The code looks like this:</font> <br> <br><font size="2">DWORD bar(</font><font size="2" color="blue">void</font><font size="2">* param)</font> <br><font size="2"> {</font> <br><font size="2" face="sans-serif"> // do something</font> <br><font size="2" face="sans-serif"> return 0;</font> <br><font size="2" face="sans-serif"> }</font> </blockquote><div><br></div><div>AFAIK the prototype of thread start functions has to be</div><div><br></div><div>DWORD WINAPI bar(void* param);</div><div><br></div><div>The WINAPI macro expands to __stdcall, which is a relevant part of the function's signature.</div><div><br></div><div>Daniel </div><div><br></div><br><blockquote type="cite"><br> <br><font size="2">advice Main() : before()</font> <br><font size="2"> {</font> <br><font size="2"> myThread = CreateThread( NULL, 0, bar, (</font><font size="2" color="blue">void</font><font size="2">*)&ThreadArgs, 0, (LPDWORD)&myThreadId );</font> <br><font size="2"> }</font> <br> <br><font size="2">Unfortunately the Aspectc++ compiler fails cause he wants to convert the third parameter from 'DWORD (void*)' into 'LPTHREAD_START_ROUTINE' !</font> <br> <br><font size="2">Normally the "CreateThread"-function exactly needs this kind of call and the bar-function always has this return-value, but is there a solution for this problem using Aspectc++ ?</font> <br> <br><font size="2">kind regards</font> <br><font size="2">Matthias Ritter</font>_______________________________________________<br>aspectc-user mailing list<br><a href="mailto:aspectc-user@aspectc.org">aspectc-user@aspectc.org</a><br>http://www.aspectc.org/mailman/listinfo/aspectc-user<br></blockquote></div><br></body></html>