• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 741
  • Last Modified:

MemAlloc equivalent in Delphi 3

I am trying to port the following Delphi 1 code over to Delphi 3, however, the D3 compiler reports "Undeclared identifier: MemAlloc"

Evidently MemAlloc is no longer used with Win32?   What must I do to make the following D1 code compatible with D3/Win32?

Thanks.

-------------

var
Info: PBitmapInfo;
InfoSize: Integer;
Image: Pointer;
ImageSize: Longint;
begin
 with Bitmap do
  begin
    GetDIBSizes(Handle, InfoSize, ImageSize);
    Info := MemAlloc(InfoSize);
0
Monroe406
Asked:
Monroe406
1 Solution
 
rwilson032697Commented:
Use GetMem like this:

GetMem(Info, InfoSize);

Cheers,

Raymond.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now