[fpc-pascal] Windows test program

2011-06-23 Thread Carsten Bager
Hi I have this test program. It compiles and runs (shows) under Delphi (5.0). I can compile (and run it) it under FPC (2.4.4) but it does not show anything. I can see it in the Windows Job list -> Processes but not under Programmes. Anybody have a hint. Regards Carsten C:\FPC\2.4.4\bin\i386-w

Re: [fpc-pascal] Windows test program

2011-06-23 Thread Paul Breneman
Carsten, I have this test program. It compiles and runs (shows) under Delphi (5.0). I can compile (and run it) it under FPC (2.4.4) but it does not show anything. I can see it in the Windows Job list -> Processes but not under Programmes. Anybody have a hint. FPC has a WinHello.pp program in

Re: [fpc-pascal] Windows test program

2011-06-23 Thread Flávio Etrusco
On Thu, Jun 23, 2011 at 12:35 PM, Carsten Bager wrote: > Hi > I have this test program. It compiles and runs (shows) under Delphi (5.0). > I can compile (and run it) it under FPC (2.4.4) but it does not show > anything. I can see it in > the Windows Job list -> Processes but not under Programmes.

RE : [fpc-pascal] Windows test program

2011-06-23 Thread Ludo Brands
The problem is in the line ShowWindow(Window, CmdShow); CmdShow is SW_HIDE (0) with fpc and SW_RESTORE (9) in Delphi. CmdShow is a variable that is initialised in system.pp from the process STARTUPINFO structure. Don't know why fpc starts the process with SW_HIDE. Change the line to ShowWindow(

RE : RE : [fpc-pascal] Windows test program

2011-06-23 Thread Ludo Brands
OK. Found the problem. The program runs ok from the explorer but not from inside lazarus. That's where the difference in process STARTUPINFO structure comes from. Actually it is gdb that passes on the SW_HIDE in STARTUPINFO. Running the program from the command line is fine but doesn't show anythin

Re: [fpc-pascal] Platform independent alternatives

2011-06-23 Thread Flávio Etrusco
On Thu, Jun 23, 2011 at 3:18 PM, wrote: > Hi, > > I'm porting an app from Delphi to Lazarus when I came across a couple of > functions from the windows unit. Can anyone help me finding the platform > independent alternatives? > > TerminateThread You shouldn't use it, generally speaking. > Wait

[fpc-pascal] Platform independent alternatives

2011-06-23 Thread dhkblaszyk
ZeelandNet Webmail Hi, I'm porting an app from Delphi to Lazarus when I came across a couple of functions from the windows unit. Can anyone help me finding the platform independent alternatives? TerminateThread WaitForSingleObject CloseHandle TIA, Darius __

Re: [fpc-pascal] Platform independent alternatives

2011-06-23 Thread dhkblaszyk
On Thu, 23 Jun 2011 15:38:18 -0300, Flávio Etrusco wrote: On Thu, Jun 23, 2011 at 3:18 PM, wrote: Hi, I'm porting an app from Delphi to Lazarus when I came across a couple of functions from the windows unit. Can anyone help me finding the platform independent alternatives? TerminateThrea

[fpc-pascal] Linking to library on Mac

2011-06-23 Thread Darius Blaszyk
Hi, I'm porting an app from delphi to lazarus and now I reached a problem when trying to link to the library. The library comes with the .dynlib .a and all header files. I placed them somewhere under my homedir and added the following to my code: {$linklib mylibrary} I also pass the following

RE : [fpc-pascal] Windows test program

2011-06-23 Thread Carsten Bager
Thanks for the help. I tried the winhello.pp. It works OK. I can still not get my program to show from the command line (do not use gdb), but now I have something to work on (it shows OK from explorer). Regards Carsten > OK. Found the problem. The program runs ok from the explorer but not from >