Where to find WinProcs or equivalent unit

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where to find WinProcs or equivalent unit

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

Many thanks
Cleverson
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Where to find WinProcs or equivalent unit

Giuliano Colla
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)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Where to find WinProcs or equivalent unit

Marco van de Voort
In reply to this post by Cleverson-2
> 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 ?

WinProcs is a Windows 3.1x (TPW/D1) compability unit. Later versions alias
it to the windows unit as far as I know. FPC never supported 16-bit
backwards compat, so then it finally has to be updated :-)

More windows functions can be found in the jwa* units, and other units in
the "winunits" package(s).
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: Where to find WinProcs or equivalent unit

Cleverson-2
In reply to this post by Cleverson-2
Giuliano wrote:
> 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 :-) )

Thank you. I'm still with some small problems but my unit have compiled
successfully. Thanks for the hint on Lazarus too. I'll give it a try.

Cleverson
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal