[aspectc-user] (no subject)
Daniel Lohmann
daniel.lohmann at informatik.uni-erlangen.de
Wed Mar 11 17:30:09 CET 2009
On 10.03.2009, at 11:01, Matthias.Ritter at metop.de wrote:
>
> Hello,
>
> I'm programming an analysing tool for c++ code.
> I'm using the AspectC++ Add-In for Visual Studio .NET (2003).
> I tried to weave a thread into the application, starting before the
> main-function is executed.
> The code looks like this:
>
> DWORD bar(void* param)
> {
> // do something
> return 0;
> }
AFAIK the prototype of thread start functions has to be
DWORD WINAPI bar(void* param);
The WINAPI macro expands to __stdcall, which is a relevant part of the
function's signature.
Daniel
>
>
> advice Main() : before()
> {
> myThread = CreateThread( NULL, 0, bar,
> (void*)&ThreadArgs, 0, (LPDWORD)&myThreadId );
> }
>
> Unfortunately the Aspectc++ compiler fails cause he wants to convert
> the third parameter from 'DWORD (void*)' into
> 'LPTHREAD_START_ROUTINE' !
>
> 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++ ?
>
> kind regards
> Matthias Ritter_______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20090311/952a8b4f/attachment.html>
More information about the aspectc-user
mailing list