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]Shared Libraries

2003-08-29 Thread Peter Vreman
> I am looking foward into the development of a potentially large project > using FPC, but this project will require the development and dynamic > linking > of shared libraries, when looking the site docs, I saw it was not > recommended to make shared libraries with FPC, although the Programmer´s >

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

[fpc-pascal]Shared Libraries

2003-08-29 Thread Renato Borges A. Prado
I am looking foward into the development of a potentially large project using FPC, but this project will require the development and dynamic linking of shared libraries, when looking the site docs, I saw it was not recommended to make shared libraries with FPC, although the Programmer´s Manual trea

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? >