"New" in Windows...

Wohl das A & O in der Windows-Programmierung

Moderatoren: crack, Krüsty, Marwin

Beitragvon Ignat » Mittwoch 27. August 2003, 02:33

Sorry, but its me again... :)
I need help.
Its very important - this programm is for my teacher! :blink:
I know that Windows has functions for allocating free memory (I mean something like "new"(with pointers) in Pascal/C++).
But can you explain me HOW to use it?
I know that if I search very hard Ill, of course, find examples.
But I have no time!!
Please, explain me... and help.
If the ship don't know where to go - it has no fair wind...
Ignat
Alter Hase
 
Beiträge: 80
Registriert: Samstag 2. August 2003, 11:13

Beitragvon Marwin » Montag 1. September 2003, 15:05

Falls du das Problem nicht schon gelöst hast: schau dir doch mal das MASM32-Macro alloc an. Dieses verwendet eine Windows-API-Funktion zum allokieren von Speicher.

Sorry für die knappe Antwort, aber ich befinde mich zur Zeit sehr im Schulstress :unsure:

Marwin
Benutzeravatar
Marwin
Moderator
 
Beiträge: 307
Registriert: Donnerstag 8. Mai 2003, 21:19
Wohnort: Seelow, Deutschland

Beitragvon Marwin » Dienstag 2. September 2003, 14:38

Sorry, das Macro heißt iMalloc.

:D Marwin
Benutzeravatar
Marwin
Moderator
 
Beiträge: 307
Registriert: Donnerstag 8. Mai 2003, 21:19
Wohnort: Seelow, Deutschland

Beitragvon CDW » Donnerstag 2. Oktober 2003, 17:34

auch wenns etwas spät kommt:
zuerst mal:
Code: Alles auswählen
  invoke GetProcessHeap
  mov pProcessHeap,eax
 
dann:
  invoke  HeapAlloc, pProcessHeap, HEAP_ZERO_MEMORY, SIZEOF tvarstruct
  mov Speicherzeiger,eax

und nach benutzung:

invoke HeapFree,pProcessHeap,NULL,Speicherzeiger

hatte mal meine Mühe damit Listen zu realisieren, klappte am Ende aber doch, bei Anfrage kann ich auch Auschnitte posten
CDW
Alter Hase
 
Beiträge: 62
Registriert: Donnerstag 2. Oktober 2003, 17:17


Zurück zu Windows-API


Social Bookmarking
Bookmark bei: Mr. Wong Bookmark bei: Del.icio.us Bookmark bei: Webnews Bookmark bei: Icio Bookmark bei: Oneview Bookmark bei: Linkarena Bookmark bei: Newskick Bookmark bei: Folkd Bookmark bei: Yigg Bookmark bei: Digg Bookmark bei: Reddit Bookmark bei: Simpy Bookmark bei: StumbleUpon Bookmark bei: Slashdot Bookmark bei: Netscape Bookmark bei: Furl Bookmark bei: Yahoo Bookmark bei: Spurl Bookmark bei: Google Bookmark bei: Blinklist Bookmark bei: Blogmarks Bookmark bei: Diigo Bookmark bei: Technorati Bookmark bei: Newsvine Bookmark bei: Blinkbits Bookmark bei: Ma.Gnolia Bookmark bei: Smarking Bookmark bei: Netvouz

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder

cron