Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Reimar Grabowski
On Fri, 18 Dec 2009 14:58:10 +0100 Reimar Grabowski wrote: > On Fri, 18 Dec 2009 13:39:45 +0100 > Lukas Gradl wrote: > > > I'm not shure about that as I'm not that good at C. The packed record > > works at 32bit -so I thought that should be correct. > If it works on 32bit it should be correct.

Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Reimar Grabowski
On Fri, 18 Dec 2009 13:39:45 +0100 Lukas Gradl wrote: > I'm not shure about that as I'm not that good at C. The packed record > works at 32bit -so I thought that should be correct. If it works on 32bit it should be correct. > Is there a difference between 64Bit and 32Bit? Yes. Some types have d

Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Lukas Gradl
Jonas Maebe schrieb: You must never use a "packed" record for a C record, unless it is declared in C using __attribute__((__packed__)). The fact that it worked in 32 bit was pure coincidence. You also have to add {$packrecords c} to your source file to tell the compiler to lay out records the

Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Jonas Maebe
On 18 Dec 2009, at 13:39, Lukas Gradl wrote: > rMonitor=packed record ... end; rMonitorEx=packed record dwMonitorSize:DWORD; Monitor:rMonitor; end; Are you sure the C record is packed too ? This would mean that all function pointers in rMonitor are not aligned. I'm not shure ab

Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Lukas Gradl
> rMonitor=packed record ... end; rMonitorEx=packed record dwMonitorSize:DWORD; Monitor:rMonitor; end; Are you sure the C record is packed too ? This would mean that all function pointers in rMonitor are not aligned. I'm not shure about that as I'm not that good at C. The p

Re: [fpc-pascal] Forum merger

2009-12-18 Thread Graeme Geldenhuys
Vincent Snijders wrote: > > The most important thing now is that (at least) one > person actually starts *coding* and making his source available. Where is not > that > important. I agree 100%. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http:/

Re: [fpc-pascal] Forum merger

2009-12-18 Thread Vincent Snijders
Graeme Geldenhuys schreef: I really don't care where projects are created - I think SourceForge or GitHub are more visible and accessible by all. So that would be my first choice anyway. I really don't care either. The most important thing now is that (at least) one person actually starts *co