Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

HX fails at anonymous memory mapping (DOSX)

posted by myrkraverk(R), 25.11.2010, 10:07

> > HX fails at anonymous memory mapping
>
> [snip]
>
> > // Note: hardcoded size.
> > HANDLE map = CreateFileMapping( 0, NULL, PAGE_READWRITE, 0, 6, NULL );
>
> I don't think that 0 as first parameter will trigger "anonymous" memory
> mapping. Actually, 0 is a valid file handle. Please make yourself familiar
> with the Win32 API!

You're right, I need to pass in INVALID_HANDLE_VALUE. Shame on me. Note to self: Never assume a 0 void * is an invalid value.


Johann

 

Complete thread:

Back to the forum
Board view  Mix view
15108 Postings in 1358 Threads, 246 registered users, 15 users online (0 registered, 15 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum