Lazarus

Programming => Operating Systems => Windows => Topic started by: MuteClown on February 17, 2011, 04:00:22 pm

Title: VirtualAllocEx
Post by: MuteClown on February 17, 2011, 04:00:22 pm
I am unable to use VirtualAllocEx, i am using the Windows and SysUtils units.

Error: Identifier not found "VirtualAllocEx

Is what i am getting, i know its a kernel32 function, am i not using the right units or is it located some where else? Or maybe not implemented any where?

Title: Re: VirtualAllocEx
Post by: Leledumbo on February 17, 2011, 04:45:10 pm
grepping my fpc source, I found it in jwawinbase.
Title: Re: VirtualAllocEx
Post by: MuteClown on February 17, 2011, 06:01:44 pm
Thanks you  :)

Title: Re: VirtualAllocEx
Post by: framework on July 11, 2011, 03:54:35 pm
Is there a way to manually define API calls in lazarus? :D
Title: Re: VirtualAllocEx
Post by: Leledumbo on July 11, 2011, 04:45:45 pm
Quote
Is there a way to manually define API calls in lazarus?
You mean:
Code: [Select]
uses
  ctypes;

{ links to somecfunc defined in a library someclib (libsomeclib.so on
  Linux, someclib.dll on Windows, someclib.dylib on Mac, or
  libsomeclib.a if static) }
function somecfunc(c: cint): cint; cdecl; external 'someclib';
{ links to myfunc defined in a library alib with, but you access it
  with localfunc symbol (useful when function name conflicts with
  Pascal keywords) }
procedure localfunc; stdcall; external 'alib' name 'myfunc';
More info (http://www.freepascal.org/docs-html/prog/progse28.html#x169-1720007.1)
Title: Re: VirtualAllocEx
Post by: framework on July 11, 2011, 05:54:07 pm
Thanks!

I just moved from VB.NET to Pascal and many of my programs had a heavy use of API calls.
Title: Re: VirtualAllocEx
Post by: marcov on July 11, 2011, 10:39:31 pm
added virtualallocex in trunk.

Consider adding bugreports for missing calls, specially if they are relatively common used.
TinyPortal © 2005-2018