Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Going crazy about D5 & Undeclared identifier: 'RTLUnwindProc'

60 views
Skip to first unread message

Mário Reis

unread,
Mar 13, 2008, 3:34:14 PM3/13/08
to
Does any one know if it possible to compile Exceptionerrorhandlig routine
(ExceptLog.PAs
from // http://www.jirihajek.net/delphi/ExceptLog.htm.

It seams to work fine with D7 but i'm not able to compile it wiht D5.
I allways receive this message:

[Error] ExceptLog.pas(138): Undeclared identifier: 'RTLUnwindProc'

Can You Help?

Thanks in advance
Mário


Pieter Zijlstra

unread,
Mar 13, 2008, 4:10:07 PM3/13/08
to
Mario Reis wrote:

> Mario

RTLUnwindProc is a normal pointer, it is initialized with the windows
API RTLUnwind.


interface

const
kernel = 'kernel32.dll';

var
RTLUnwindProc: Pointer;

implementation

procedure RtlUnwind; stdcall; external kernel name 'RtlUnwind';

initialization
RTLUnwindProc := @RTLUnwind;
end.

--
Pieter

Mike Williams (TeamB)

unread,
Mar 13, 2008, 4:56:11 PM3/13/08
to
Pieter Zijlstra wrote:

> RTLUnwindProc is a normal pointer, it is initialized with the windows
> API RTLUnwind.

In D7, yes, but not in D5.

--
-Mike (TeamB)

Pieter Zijlstra

unread,
Mar 13, 2008, 5:04:02 PM3/13/08
to
Mike Williams (TeamB) wrote:

> > RTLUnwindProc is a normal pointer, it is initialized with the
> > windows API RTLUnwind.
>
> In D7, yes, but not in D5.

Yes, I know, that's why I gave the rest of the information :)

--
Pieter

Remy Lebeau (TeamB)

unread,
Mar 13, 2008, 6:00:22 PM3/13/08
to

"Mário Reis" <mariod...@gmail.com> wrote in message
news:47d9...@newsgroups.borland.com...

> It seams to work fine with D7 but i'm not able to compile it wiht D5.

That download page specifically states that it was tested with D7 only.

> I allways receive this message:
>
> [Error] ExceptLog.pas(138): Undeclared identifier: 'RTLUnwindProc'

RTLUnwindProc does not exist in D5. It was introduced in D6. That code
will not be able to function in D5 at all unless you re-write it to hook the
imported RtlUnwind() function directly.

Otherwise, I suggest you use another exception logger, such as MadExcept
(http://www.madexcept.com), which is known to work in many Delphi (and C++)
versions.


Gambit


Mário Reis

unread,
Mar 16, 2008, 1:10:40 PM3/16/08
to
I'm sorry! Now it compiles without erros but it doesn't seam to work.
Nothing is writen to error_log_file.
Why?
Thank any way
Mįrio

"Pieter Zijlstra" <p.zylstr...@hccnet.nl> escreveu na mensagem
news:xn0fnnar...@newsgroups.borland.com...

Remy Lebeau (TeamB)

unread,
Mar 18, 2008, 3:15:09 PM3/18/08
to

"Mário Reis" <mariod...@gmail.com> wrote in message
news:47e009d4$1...@newsgroups.borland.com...

> I'm sorry! Now it compiles without erros but it doesn't
> seam to work. Nothing is writen to error_log_file.
> Why?

As I mentioned in my earlier reply, D5 simply does not offer the kind of
hooking that ExceptLog is trying to use. Just defining your own
RTLUnwindProc variable like Pieter suggested is not going to change that.
ExceptLog will not function properly in D5 unless you re-write it. So
either upgrade to D6+ in order to use ExceptLog, or else use a different
exception tracker that supports D5, such as MadExcept
(http://www.madexcept.com).


Gambit


Pieter Zijlstra

unread,
Mar 18, 2008, 7:18:19 PM3/18/08
to
Remy Lebeau (TeamB) wrote:

> > I'm sorry! Now it compiles without erros but it doesn't
> > seam to work. Nothing is writen to error_log_file.
> > Why?
>
> As I mentioned in my earlier reply, D5 simply does not offer the kind
> of hooking that ExceptLog is trying to use. Just defining your own
> RTLUnwindProc variable like Pieter suggested is not going to change
> that.

Mario,

sorry for confusing you, I didn't look how RTLUnwindProc is used in
Delphi and/or Exceptlog. Like Remy already said it's not going to work
by just adding the definitions.

--
Pieter

0 new messages