[fpc-pascal] Where to find WinProcs or equivalent unit

Giuliano Colla giuliano.colla at fastwebnet.it
Sat Jan 26 12:45:52 CET 2008


Cleverson ha scritto:
> Hi,
> 
> Using FreePascal, I'm trying to compile an open source project written
> originally in Delphi 6.
> 
> Some units require Winprocs, for accessing
> functions such as GetPrivateProfileString. I didn't find it amongst
> FreePascal's installed units. I searched it in Google and got a WinProcs
> unit from the following adress, but FPC gives lots of errors while
> trying to compile it:
> http://inf.unisul.br/~osmarjr/download/delphi/units/winprocs.zip
> 
> Where can I get either WinProcs or something equivalent for FreePascal ?
> 

The function GetPrivateProfileString is in the fpc Windows32 API 
Library. A quick look to Winprocs shows that also other functions 
defined there should be in the windows unit.
A "uses windows" clause in place of "uses Winprocs" should solve your 
problem (hopefully :-) )

A hint. Even if you're not using GUI, you may take advantage of Lazarus 
to help you in may ways. Lazarus IDE has:

a powerful "Find in files" tool, which makes it possible to quickly 
locate the units you need (it was a matter of seconds to locate the 
function you required)

a powerful editor: you just pass the cursor over a string and a pop-up 
will tell you where the variable/function/object is defined. Right click 
and you may "find declaration": it'll open the file for you positioned 
at the definition. Right click again and "jump to procedure", etc etc.

You may use Lazarus IDE to set your project options, your compiler 
options, to create clean packages which include all the relevant 
information

Giuliano


-- 
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)



More information about the fpc-pascal mailing list