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

Overwriting Today and Seconds

51 views
Skip to first unread message

Arne Ortlinghaus

unread,
Apr 30, 2013, 3:48:32 AM4/30/13
to
I would like to overwrite the two functions Today and Seconds. For one
customer I have to adjust the OS date and time using a time zone model. But
I need also the originally functionality, calling the original functions in
the VO28Run dll or having a substitute for both functions.

Arne Ortlinghaus
ACS Data Systems


Wolfgang Riedmann

unread,
Apr 30, 2013, 4:11:19 AM4/30/13
to
Hi Arne,

> I would like to overwrite the two functions Today and Seconds. For
> one customer I have to adjust the OS date and time using a time zone
> model. But I need also the originally functionality, calling the
> original functions in the VO28Run dll or having a substitute for both
> functions.

Uwe Holz had presented something like this years ago....

If I remember correctly, you could define the functions in your own
library, overwriting the ones of the system library.
To call the original ones, you could use a _dll statement, using other
names.

If you need more info, I can search my archives if I can find something.

Wolfgang


--

Malcolm G

unread,
Apr 30, 2013, 4:24:20 AM4/30/13
to
On 30/04/2013 08:48, Arne Ortlinghaus wrote:
> I would like to overwrite the two functions Today and Seconds. For one
> customer I have to adjust the OS date and time using a time zone model. But
> I need also the originally functionality, calling the original functions in
> the VO28Run dll or having a substitute for both functions.

Do you want to override them everywhere or only in code you write?

(In code you write it is fairly easy, I don't know how do it everywhere)

Karl-Heinz

unread,
Apr 30, 2013, 5:37:55 AM4/30/13
to
Hi Arne,

>I would like to overwrite the two functions Today and Seconds. For one
>customer I have to adjust the OS date and time using a time zone model. But
>I need also the originally functionality, calling the original functions in
>the VO28Run dll or having a substitute for both functions.

1. To be able to use the original functionality later on, import the desired
function with a different name.

2. Overwrite the original function and add your business logic.

------------------------
_DLL FUNCTION DefaultToday() AS DATE PASCAL:VO28RUN.Today
-------------------------

FUNCTION Today() AS DATE PASCAL
LOCAL d AS DATE

IF Specialcondition

d := ....

ELSE
d := DefaultToday()

ENDIF


RETURN d

---------------------
regards
Karl-Heinz

Arne Ortlinghaus

unread,
Apr 30, 2013, 6:07:49 AM4/30/13
to
Hi Wolfgang, Malcom, Karl-Heinz,

yes, it was what I was searching for for changing functionality in my own
code. I did not think on the possibility of renaming the function via the
_dll statement.

Thanks a lot. You all have had a good performance returning an unpaid answer
in less than 2 hours :-)

Arne


"Karl-Heinz" <inv...@invalid.invalid> schrieb im Newsbeitrag
news:au9hpp...@mid.individual.net...
0 new messages