🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3703

Re: TimeSetEvent

#3703
From: Bob Gonder
Date: Fri, 28 Apr 2006 16:58
16 lines
1478 bytes
David Dean wrote:

>class myClass
>{
>   void CALLBACK OneShotTimer(UINT wTimerID, UINT msg, DWORD dwUser,
>};
>   timeSetEvent(timeout, 100, (LPTIMECALLBACK)&OneShotTimer, NULL,
>      TIME_ONESHOT);
>
>[C++ Error] Unit1.cpp(22): E2031 Cannot cast from 'void (__stdcall *
>(_closure )(unsigned int,unsigned int,unsigned long,unsigned 

Asked many times on this very group.
You might Google for "nativeapi _closure"

Bottom line is callbacks must be static or else non-members.
Technical Details
Message-ID: <32i4521k20p3ha1bq744jvbfteei2kr01q@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <ozchzhq02-9725F7.12284128042006@frylock.local>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7550567434949799
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: TimeSetEvent
Date: Fri, 28 Apr 2006 09:58:04 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <32i4521k20p3ha1bq744jvbfteei2kr01q@4ax.com>
References: <ozchzhq02-9725F7.12284128042006@frylock.local>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 71.49.212.145
X-Trace: newsgroups.borland.com 1146243484 71.49.212.145 (28 Apr 2006 09:58:04 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail