🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #859

Re: Memory allocation in BC++ v3.1 of structures in windows

#859
From: Don Wilcox
Date: Thu, 08 Oct 1992 19:45
21 lines
1383 bytes
In article <1992Oct8.191854.20153@cs.odu.edu> popkin@orchid.cs.odu.edu (Brian Popkin) writes:
>Hello Fellow Netters:
>
>I have a question I cannot find in any book.
>I am using bc++ v3.1.
>
>How do I allocate memory in windows for a pointer to a structure, a structure,
>or an array using the functions globalalloc etc in windows.
>

If I were you, I'd just use new and delete (or malloc and free).  They do
sub-segment allocation, and you don't have to carry handles around.  Since
locked blocks aren't a problem in protected mode, there is no penalty for this
approach, and nothing but benefits.

>Brian

-- 
Don Wilcox                         | "For I am not ashamed of the Gospel of
Washington University in St. Louis |   Christ, for it is the power of salvation
email: wilcox@swarm.wustl.edu      |   to all who believe."
Technical Details
Message-ID: <1992Oct8.194536.8118@wuecl.wustl.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!eclnews!swarm.wustl.edu!wilcox
References: <1992Oct8.191854.20153@cs.odu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!eclnews!swarm.wustl.edu!wilcox
From: wilcox@swarm.wustl.edu (Don Wilcox)
Subject: Re: Memory allocation in BC++ v3.1 of structures in windows
Message-ID: <1992Oct8.194536.8118@wuecl.wustl.edu>
Sender: usenet@wuecl.wustl.edu (Usenet Administrator)
Nntp-Posting-Host: swarm
Organization: Washington University in St. Louis, MO
References: <1992Oct8.191854.20153@cs.odu.edu>
Date: Thu, 8 Oct 1992 19:45:36 GMT
Lines: 21