🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.ms.programmer
2 messages
2 total messages Started by Brian Popkin Thu, 08 Oct 1992 19:18
Memory allocation in BC++ v3.1 of structures in windows
#858
Author: Brian Popkin
Date: Thu, 08 Oct 1992 19:18
18 lines
1211 bytes
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.

Anyhelp or examples would be GREATLY appreciated.

Brian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Brian Popkin  - popkin@cs.odu.edu               |  Dedicated To The UMLS
Medical Expert Systems Researcher               |  Project....
Computer Science Department                     |
Old Dominion University - Norfolk, Virginia USA |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Re: Memory allocation in BC++ v3.1 of structures in windows
#859
Author: 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."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads