diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-12 14:39:49 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-12 14:39:49 +0200 |
commit | 662e8fc4787bb9ef25885327c8c01d538a5dc169 (patch) | |
tree | 956eb6d2911bd8c7cc89a5e81f7cdcf56422ad69 | |
parent | 4ff08e52cc4d10491d7676ece8c52792e9e89d82 (diff) |
Fix FaceAPI after changing file map permissions
-rw-r--r-- | faceapi/main.cpp | 4 | ||||
-rw-r--r-- | ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/faceapi/main.cpp b/faceapi/main.cpp index 64e721f4..6cc93112 100644 --- a/faceapi/main.cpp +++ b/faceapi/main.cpp @@ -517,11 +517,11 @@ bool SMCreateMapping() //
// Open an existing FileMapping, Read/Write access
//
- hSMMemMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS , false , (LPCSTR) SM_MM_DATA );
+ hSMMemMap = OpenFileMappingA( FILE_MAP_WRITE , false , (LPCSTR) SM_MM_DATA );
if ( ( hSMMemMap != 0 ) ) {
ftnoirConnected = true;
OutputDebugString(_T("FTCreateMapping says: FileMapping opened successfully...\n"));
- pMemData = (SMMemMap *) MapViewOfFile(hSMMemMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(TFaceData));
+ pMemData = (SMMemMap *) MapViewOfFile(hSMMemMap, FILE_MAP_WRITE, 0, 0, sizeof(TFaceData));
if (pMemData != NULL) {
OutputDebugString(_T("FTCreateMapping says: MapViewOfFile OK.\n"));
pMemData->state = 0;
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp index 6bdce889..f849392b 100644 --- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp +++ b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp @@ -207,7 +207,7 @@ bool FTNoIR_Tracker::SMCreateMapping() //
// Create a new FileMapping, Read/Write access
//
- hSMMemMap = OpenFileMappingA( PAGE_READWRITE , false , (LPCSTR) SM_MM_DATA );
+ hSMMemMap = OpenFileMappingA( FILE_MAP_WRITE, false , (LPCSTR) SM_MM_DATA );
if ( ( hSMMemMap != 0 ) ) {
qDebug() << "FTNoIR_Tracker::FTCreateMapping says: FileMapping Created again..." << hSMMemMap;
pMemData = (SMMemMap *) MapViewOfFile(hSMMemMap, FILE_MAP_WRITE, 0, 0, sizeof(TFaceData));
|