Solved

CreateFileMapping parameter

Posted on 1999-01-05
4
214 Views
Last Modified: 2013-12-03
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
0
Comment
Question by:yray
4 Comments
 

Expert Comment

by:Ignatz
ID: 1418121
use NULL
0
 

Author Comment

by:yray
ID: 1418122
I already stated that I have use Null and the constant PAGE_READWRITE is left unsolved.
0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1418123
#include <winnt.h>
0
 
LVL 11

Expert Comment

by:alexo
ID: 1418124
Better to use:

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

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Multi Table MS Access Query 5 75
Run Program using VBScript 3 65
Dir function fails on mapped drives 28 133
Is IHttpActionResult a promise pattern? 2 67
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question