Article View: borland.public.delphi.nativeapi
Article #12108Re: GetThreadContext returns invalid values
From: Brian Cook
Date: Sat, 23 Nov 2002 18:38
Date: Sat, 23 Nov 2002 18:38
24 lines
1672 bytes
1672 bytes
> HI. Greetings. > I use the following code: > > <..> > var > context: _context; > begin > GetThreadContext(GetCurrentThread, context) > <..> > So it should return current thread context, but all values are invalid. > Context.EIP is much greater than one shown in CPU window (greater than > $E1000000). What's wrong? You failed to read the comments for TContext in Windows.pas. Try this... FillChar( Context, sizeof(Context), 0 ); // Probably not necessary Context.ContextFlags := CONTEXT_FULL; GetThreadContext( GetCurrentThread, Context ); - Brian
Technical Details
Message-ID:
<3ddfcb32@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mailReferences:
<3ddfb320@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f94dd,334d5eef68190214 X-Google-Attributes: gidf94dd,public X-Google-ArrivalTime: 2002-11-23 11:15:40 PST Reply-To: "Brian Cook" <bcook@rowdydogsoftware[REMOVE].com> From: "Brian Cook" <bcook@rowdydogsoftware[REMOVE].com> Newsgroups: borland.public.delphi.nativeapi References: <3ddfb320@newsgroups.borland.com> Subject: Re: GetThreadContext returns invalid values Date: Sat, 23 Nov 2002 12:38:43 -0600 Lines: 27 Organization: Rowdy Dog Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 207.170.105.25 Message-ID: <3ddfcb32@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038076722 207.170.105.25 (23 Nov 2002 10:38:42 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail