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, 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
22049 Postings in 2034 Threads, 396 registered users, 106 users online (1 registered, 105 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum