Re: [fpc-pascal] Move() vs MemCopy()

2009-09-30 Thread Hans Mårtensson
Graeme Geldenhuys wrote: 2009/9/29 Vincent Snijders : I never thought that mov ax, bx (8086 assembler) would clear the register after the move. If you put it like that, it never (for some strange reason) confused be either. :-) I guess that's probably because everything in assembler c

Re: [fpc-pascal] Strange error

2009-06-08 Thread Hans Mårtensson
Vincent Snijders wrote: Hans Mårtensson schreef: When compiling a windows program with FPC version 2.2.4 with the switch -dDEBUG (using the default configuration), after running the program I get the following message: - Error Heap dump by heaptrc unit 0 memory

[fpc-pascal] Strange error

2009-06-08 Thread Hans Mårtensson
When compiling a windows program with FPC version 2.2.4 with the switch -dDEBUG (using the default configuration), after running the program I get the following message: - Error Heap dump by heaptrc unit 0 memory blocks allocated: 0/0 0 memory blocks freed: 0/0 0 unf

Re: [fpc-pascal] A question or two regarding the FPC

2009-05-08 Thread Hans Mårtensson
ot, and without any sign of any problem. But then, in case of zero-tolerance, if you trust the compiler, what about the OS? and, worst, what about your program? I wouldn't trust the reliability of anything before the full system has been tested under working cond

Re: [fpc-pascal] Windres

2007-10-03 Thread Hans Mårtensson
way to find a usefull example of code. Thank you for the help. Hans Mårtensson ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Windres

2007-10-01 Thread Hans Mårtensson
The FPC documentation prog.pdf (win32 version) explains how to use the windres.exe to format data such that the FPC compiler can include them i the exe file as a resource that can be used by the program via the windows API's. But only for string tables. Yet it indicates that the windres.exe pro

[fpc-pascal] 2 Q on unexpected behaviour of FPC2.0.4

2006-12-17 Thread Hans Mårtensson
When making some windows program with FPC2.0.4 using sysutils, I encountered a few problems that I tracked down to some (by me) unexpected behaviour of the compiler. The documentation is not clear on these points. So may I ask if the following is intentional or rather some bug. Q1. When tryin

Re: [fpc-pascal] Executing another program from Pascal

2006-03-29 Thread Hans Mårtensson
Marco van de Voort wrote: However please use executeprocess, it will avoid problems with too deeply nested paths. (dos.exec is limited to an overall 255 chars). Yes I got that - and that is exactly the function I need for my program, I think.

Re: [fpc-pascal] Executing another program from Pascal

2006-03-29 Thread Hans Mårtensson
view) Elio Cuevas Gómez wrote: El Mar 28 Mar 2006 13:40, Hans Mårtensson escribió: In good old days the Turbo Pascal had an EXEC procedure .. I think that function is in the DOS unit. And it even works in Linux! Until recently I have only made win32 programs. Now I am trying to do some

[fpc-pascal] Executing another program from Pascal

2006-03-28 Thread Hans Mårtensson
In good old days the Turbo Pascal had an EXEC procedure that could execute another program by invoking the DOS command interpreter. In better new days the FPC does not seem to have such an option, or I couldn’t find it in the docs. Now I am particularly interested in doing such a thing in a Li

Re: [fpc-pascal] WinSock

2006-03-17 Thread Hans Mårtensson
hich makes it possible to call the win32 API's as documented by microsoft. Hans Mårtensson ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-08 Thread Hans Mårtensson
til a corrected version of FPC is released. Thank you very much. Hans Mårtensson ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-08 Thread Hans Mårtensson
with 2.0.2 was sizeof(DLGTEMPLATE)=26 while the old working version had sizeof(DLGTEMPLATE)=18 which fits to 4 longint in stead of 4 shortint. Now, I'm not familiar with the development of the PFC, where and when can I download the corrected version of 2.0.2? Hans

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-08 Thread Hans Mårtensson
Jonas Maebe wrote: Can you check the date of the compiler with "fpc -iD"? As far as I know no new snapshot was built last night because of errors compiling the graph unit. Right. Even though the zip file date is more recent, the "fpc -D" returns: 2005/12

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-07 Thread Hans Mårtensson
mem, using move to put data there, then finally assigned the pBox2 that is of type pointer. (typeless I mean). I can't see if that possibly can be treated diffently in the 2.0.2 compiler? Hans Mårtensson ___ fpc-pascal maillist - fpc-pascal@lis

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-06 Thread Hans Mårtensson
Jonas Maebe wrote: On 04 Jan 2006, at 23:46, Hans Mårtensson wrote: When I compile this source code with FPC 1.0.10, it produces a program that makes a window with one menu item. When you click on it, a dialogue box pops up. But when I compile the same source code with FPC 2.0.2, I

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-04 Thread Hans Mårtensson
Jonas Maebe wrote: On 04 Jan 2006, at 21:51, Hans Mårtensson wrote: The type of pBoxtemplate is ^word. Is it not true that (dword(pBoxtemplate) and 1)=1 evaluates to TRUE, if and only if pBoxtemplate is NOT aligned to a word boundary (16 bit boundary)? And then, assuming pBoxtemplate is

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-04 Thread Hans Mårtensson
Jonas Maebe wrote: On 04 Jan 2006, at 17:51, Hans Mårtensson wrote: Does PPC 2.0.2 handle alignment of data the same way as former versions? The statements below have nothing to do with alignment. Will the statements (the conditions) if (dword(pBoxtemplate) and 1)=1 then pBoxtemplate

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-04 Thread Hans Mårtensson
ed in bytes, regardless of the type of pBoxItem? Hans Mårtensson ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-03 Thread Hans Mårtensson
Jonas Maebe wrote: On 28 Dec 2005, at 23:49, Hans Mårtensson wrote: The problem was the following program line, using the windows unit: if DialogBoxIndirect(0, pBox2, Window, @Box2Proc) = 0 then exit; The compiler assessed an error in parameter 4. Should not be an address, but a variable

[fpc-pascal] Problem with FPC2.0.2 and windows

2005-12-29 Thread Hans Mårtensson
I decided to improve an old program, I had written for windows, using FreePascal 1.0.10. Having downloaded FPC 2.0.2, I wanted to use this version, believing that the newer is the better. So I tried to recompile my old source code with 2.0.2, getting a lot of compile errors. Anyhow, all of them

Re: [fpc-pascal]Runtime error 87

2003-06-16 Thread Hans Mårtensson
At 16:13 16-06-2003 +0200, you wrote: >At 12:00 11/06/2003 +0200, you wrote: >>The FreePascal User's guide has a list of the possible run time errors. But >>what if you encounter an error that is not on the list? >>Right now I would like to know the meaning of run time error 87. >>(Generated by a w

Re: [fpc-pascal]Runtime error 87

2003-06-11 Thread Hans Mårtensson
At 13:25 11-06-2003 +0200, you wrote: > > > >If the error is not in the list of run-time errors, it means it is an >OS-specific error which is not translated to an equivalent Free Pascal >error. You will have to look up the meaning of this error in the >Windows API documentation. > >Michael

[fpc-pascal]Runtime error 87

2003-06-11 Thread Hans Mårtensson
The FreePascal User's guide has a list of the possible run time errors. But what if you encounter an error that is not on the list? Right now I would like to know the meaning of run time error 87. (Generated by a win32 program and possibly caused by a lot of calls to the seek funktion?) Hans Maart

Re: [fpc-pascal]Re: Linking to Windows

2003-02-08 Thread Hans Mårtensson
At 04:57 08-02-2003 -0800, you wrote: >If you have a copy of Delphi's ImageHlp unit, >( or h2pas + imagehlp.h winapi header ) >you might want to take a look at this: >http://www.blueorbsoft.com/CodeTips/DelphiCodeTips2.html#ListDLLFunctions > Thanks for the tip. Unfortunately I haven't got the un

Re: [fpc-pascal]Linking to Windows

2003-02-07 Thread Hans Mårtensson
At 15:28 06-02-2003 +0100, you wrote: >You may use the GetProcAddress (Win32 API function) to retrieve the >procedure's START-ADDRESS, wehre the input parameter is EITHER an index, I >think of limited size, OR a name, that must be SPELLED CORRECTLY. > >If you try both, and look for MATCHING ADDRE

Re: [fpc-pascal]Linking to Windows

2003-02-05 Thread Hans Mårtensson
At 02:00 05-02-2003 +0100, you wrote: >please post the 'uses' clauses and the function declaration from your source. >that should make it easier. > >anton. > Here is a test program I have used: program x_prog; {$APPTYPE GUI} uses windows; var pPrinter: LPHANDLE; prd: PRINTER_DEFAULTS; Procedu

Re: [fpc-pascal]Linking to Windows

2003-02-05 Thread Hans Mårtensson
At 19:10 04-02-2003 -0500, you wrote: > >You can get the SDK help files from Borland: > >ftp://ftp.borland.com/pub/delphi/techpubs/delphi3/d3ms.zip > >Be warned, this is a 15M download. > >Rolf Grunsky Thank you for the link, but I have allready got these help files allthough in an older version,

Re: [fpc-pascal]Linking to Windows

2003-02-04 Thread Hans Mårtensson
At 05:46 04-02-2003 +0100, you wrote: >Hello, List! > >On Monday 03 February 2003 21:14, you wrote: > >> According to the Free Pascal Programmers manual chapter 4.1 it is possible >> to specify an external Windows function with: >> Procedure ProcName(Args: TProcArgs); external 'Name' index SomeInde

[fpc-pascal]Linking to Windows

2003-02-03 Thread Hans Mårtensson
According to the Free Pascal Programmers manual chapter 4.1 it is possible to specify an external Windows function with: Procedure ProcName(Args: TProcArgs); external 'Name' index SomeIndex But where can I get information on which function has which index in which DLL? Hans M. __

[fpc-pascal]Units for Windows

2003-01-24 Thread Hans Mårtensson
According to the FreePascal Documentation the Windows unit includes the API calls for the Windows OS as doucumented in Borland's Win32 help file. But not all of them. I discovered another unit, named mmsystem, that took care of the functions to be used in connection with the sound card. With this