Recent

Author Topic: VirtualAllocEx  (Read 8264 times)

MuteClown

  • New Member
  • *
  • Posts: 33
VirtualAllocEx
« 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?


Leledumbo

  • Hero Member
  • *****
  • Posts: 8266
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: VirtualAllocEx
« Reply #1 on: February 17, 2011, 04:45:10 pm »
grepping my fpc source, I found it in jwawinbase.

MuteClown

  • New Member
  • *
  • Posts: 33
Re: VirtualAllocEx
« Reply #2 on: February 17, 2011, 06:01:44 pm »
Thanks you  :)


framework

  • Newbie
  • Posts: 2
Re: VirtualAllocEx
« Reply #3 on: July 11, 2011, 03:54:35 pm »
Is there a way to manually define API calls in lazarus? :D
(‘) (.)
/¯¯/_o___o___o___o____o__
BWAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!
\__\¯¯o¯¯¯o¯¯¯¯¯¯o¯¯¯¯¯¯o

Leledumbo

  • Hero Member
  • *****
  • Posts: 8266
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: VirtualAllocEx
« Reply #4 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

framework

  • Newbie
  • Posts: 2
Re: VirtualAllocEx
« Reply #5 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.
(‘) (.)
/¯¯/_o___o___o___o____o__
BWAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!
\__\¯¯o¯¯¯o¯¯¯¯¯¯o¯¯¯¯¯¯o

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8722
  • FPC developer.
Re: VirtualAllocEx
« Reply #6 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.
« Last Edit: July 11, 2011, 10:42:02 pm by marcov »

 

TinyPortal © 2005-2018