CreateFileMapping parameter

I follow the sample code from MSDN as shown below.

h = CreateFileMapping(-1,pNull,PAGE_READWRITE,0, 65535,"MyShare")

The problem I am having is that I can't find where the constant pNull and PAGE_READWRITE are defined. I tried to replace pNull with vbNull, Null, 0, and 0& and I get type mismatch error. How can I create a handle by using CreateFileMapping.  Please help
yrayAsked:
Who is Participating?
 
chensuCommented:
#include <winnt.h>
0
 
IgnatzCommented:
use NULL
0
 
yrayAuthor Commented:
I already stated that I have use Null and the constant PAGE_READWRITE is left unsolved.
0
 
alexoCommented:
Better to use:

    #define STRICT
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.