[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CreateFileMapping parameter

Posted on 1999-01-05
4
Medium Priority
?
234 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 100 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
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…
Loops Section Overview

831 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