Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory mapped files

Status
Not open for further replies.

ahoodin

Programmer
Jul 25, 2001
48
0
0
US
I have an NT4 Box that is running an application suite that communicates over a bunch of memory mapped files. These files however have special
permissions set:

Administrators (Special Access DPOQM)
System (Special Access DPOQM)

The writers of this application suite took special note
to lock out as much external integration as possible. The the application suite is an *open* application suite when it is really open on a need to open basis.

How do I modify this on a permanant basis?

THXE09,

ahoodin


//declare Memory Mapped File Variables
HANDLE hMMF=0;
DWORD dwBaseMMF;
boolean bOpened = false;
//test to see if handle currently open
if(hMMF!= NULL) return true; // Already opened
//open file mapping
hMMF = OpenFileMapping(FILE_MAP_READ,FALSE,"AppCommunication");
if(hMMF != NULL)bOpened = true;
//here I Map a view of the file and should get data at the dwBaseMMF or the
//starting memory location of the memory mapped file
if(!hMMF == NULL) DWORD dwBaseMMF = (DWORD)MapViewOfFile(hMMF,FILE_MAP_READ,0, 0, 256);
// THERE SHOULD BE DATA AT THE MEMORY ADDRESS (PVOID)dwBaseMMF NOW BUT THERE ISN'T
//here I close up shop
if(hMMF != NULL)
{ if (!CloseHandle(hMMF))
errmsg(GetLastError());
hMMF = NULL;
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top