Re: [fpc-pascal]More strangeness...

2003-08-31 Thread XHajT03
From: L D Blake <[EMAIL PROTECTED]> Organization: Secret society to end secret societies To: Peter Vreman <[EMAIL PROTECTED]> Subject: Re: [fpc-pascal]More strangeness... Send reply to: [EMAIL PROTECTE

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread Michalis Kamburelis
Marco van de Voort wrote: ... > Does somebody know something more about Winapi errorhandling? ... It works the same way as under libc but instead checking ErrNo you check GetLastError. Expressing it as clearly as I can: For each WinPAI call you should check the WinAPI documentation (as with ev

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread L D Blake
In reply to your message of August 30, 2003 > Something else. But I think you are on the wrong track with HWND. This is a possibility I've considered. It might be something else entirely... but it is definately something related to my program... Another possibility, and one I've tested for, is

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread L D Blake
In reply to your message of August 30, 2003 > We can discuss principles for hours of course, but that doesn't help you. > Did you try to change the HWND type from longint to DWORD or Cardinal > (which is the same) in the windows unit ? If so, does it help ? I re-declared Hwind to be a longword in

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread Marco van de Voort
> In reply to your message of August 29, 2003 > > > And it has been already a longint for 5 years. > > Which pre-dates all of NT4, win2000, XP, 2003 ... Which are true 32 bit > operating systems. NT4 is older, I run 2000 and before that its beta's on my work space for 24 hours/a week since earl

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread Marco van de Voort
> In reply to your message of August 29, 2003 > > > Yes I think about it. Typed negative on this side (the pascal side). On > > 2-complements it is the same binary layout, only the interpretation is > > different. The win32 API sees no difference, since it puts its own typing > > over it. > > No

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread Michael . VanCanneyt
On Fri, 29 Aug 2003, L D Blake wrote: > In reply to your message of August 29, 2003 > > Yes I think about it. Typed negative on this side (the pascal side). On > > 2-complements it is the same binary layout, only the interpretation is > > different. The win32 API sees no difference, since it pu

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread L D Blake
In reply to your message of August 29, 2003 > Yes I think about it. Typed negative on this side (the pascal side). On > 2-complements it is the same binary layout, only the interpretation is > different. The win32 API sees no difference, since it puts its own typing > over it. Not to be sarcasti

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread L D Blake
In reply to your message of August 29, 2003 > And it has been already a longint for 5 years. Which pre-dates all of NT4, win2000, XP, 2003 ... Which are true 32 bit operating systems. I can't help wondering if the handle is somehow being changed by the type mismatch giving rise to duplicate han

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread L D Blake
In reply to your message of August 29, 2003 > Yes I think about it. Typed negative on this side (the pascal side). On > 2-complements it is the same binary layout, only the interpretation is > different. The win32 API sees no difference, since it puts its own typing > over it. Turn on Pascal's ra

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Marco van de Voort
> In reply to your message of August 29, 2003 > > >> Peter, longint is simply wrong. > > > Is it? > > Yeah totally wrong... A negative handle??? Think about it... Yes I think about it. Typed negative on this side (the pascal side). On 2-complements it is the same binary layout, only the inter

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread L D Blake
In reply to your message of August 29, 2003 >> Peter, longint is simply wrong. > Is it? Yeah totally wrong... A negative handle??? Think about it... > Moreover, I agree with Peter, HWND's are used really a lot. Inside FPC, > ICS, Lazarus etc etc. Yep, well here's the rub... I took an older

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread L D Blake
In reply to your message of August 29, 2003 > Peter, longint is simply wrong. whist is may work in most circumstances, if > you are on a system with a lot of handles being allocated, you will get to > the realms on 32bit unsigned values. As the normal test for a handle > allocation is : There's a

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread L D Blake
In reply to your message of August 29, 2003 > In the development branch THandle is a Cardinal. In the stable 1.0.x > branch we left it an Longint. In the past there were some issues in the > with Cardinal. At that moment it was decided to leave thandle at longint. > And it has been already a longi

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread L D Blake
In reply to your message of August 29, 2003 > It could be the handle which is passed on the lost focus event. That's what I'm thinking... a handle passed in LParam, which is defined as a longint in the windows unit and thus in my code, causing a range checking error. I've been looking further at

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Marco van de Voort
> > with Cardinal. At that moment it was decided to leave thandle at longint. > > And it has been already a longint for 5 years. When it was really a > > problem then it would have been noticed much earlier. > > Peter, longint is simply wrong. Is it? FPC 1.0.x is at D2..D4 level, and some of th

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Matt Emson
> In the development branch THandle is a Cardinal. In the stable 1.0.x > branch we left it an Longint. In the past there were some issues in the > with Cardinal. At that moment it was decided to leave thandle at longint. > And it has been already a longint for 5 years. When it was really a > proble

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Peter Vreman
> >> Yep, I took a look at the windows unit last night, found the bulk of >> type >> declarations were in BASE.INC and noticed, almost right away, that > "Handle" a >> 32 bit unsigned value is declared as a longint. Shouldn't it be a > LongWord? A >> longint has only half as many positive values as

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Matt Emson
> Yep, I took a look at the windows unit last night, found the bulk of type > declarations were in BASE.INC and noticed, almost right away, that "Handle" a > 32 bit unsigned value is declared as a longint. Shouldn't it be a LongWord? A > longint has only half as many positive values as a longword

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Michael . VanCanneyt
On Fri, 29 Aug 2003, L D Blake wrote: > In reply to your message of August 29, 2003 > > Do you catch the 'focus lost' event ? Do you have any assembler ? > > Windows expects some registers to be saved. > > No and no. But come to think of it that's about when the problem is occuring. It could b

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread L D Blake
In reply to your message of August 29, 2003 > Do you catch the 'focus lost' event ? Do you have any assembler ? > Windows expects some registers to be saved. No and no. But come to think of it that's about when the problem is occuring. > Are the winproc routines declared as stdcall ? Yes. >

Re: [fpc-pascal]More strangeness...

2003-08-29 Thread Michael Van Canneyt
On Thu, 28 Aug 2003, L D Blake wrote: > In reply to your message of August 28, 2003 > > > On Thu, 28 Aug 2003, L D Blake wrote: > > >> Why is it that if I compile an FPC program with range checking turned on, > >> opening any HTML file in ie immediately causes "Error 201" from my FPC program? >

Re: [fpc-pascal]More strangeness...

2003-08-28 Thread L D Blake
In reply to your message of August 28, 2003 > On Thu, 28 Aug 2003, L D Blake wrote: >> Why is it that if I compile an FPC program with range checking turned on, >> opening any HTML file in ie immediately causes "Error 201" from my FPC program? > Ahem. > A litlle bit more information may be in or

Re: [fpc-pascal]More strangeness...

2003-08-28 Thread Michael Van Canneyt
On Thu, 28 Aug 2003, L D Blake wrote: > Why is it that if I compile an FPC program with range checking turned on, > opening any HTML file in ie immediately causes "Error 201" from my FPC program? Ahem. A litlle bit more information may be in order here ? What kind of program is this ? What unit

[fpc-pascal]More strangeness...

2003-08-28 Thread L D Blake
Why is it that if I compile an FPC program with range checking turned on, opening any HTML file in ie immediately causes "Error 201" from my FPC program? --- L D Blake ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/li