CFile::Open flags in LoadFromFile |
Post Reply |
Author | |
VitVal
Newbie Joined: 14 March 2009 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 25 September 2009 at 7:24pm |
The CXTPGraphicBitmapPng::LoadFromFile has such code:
/---
CFile file;
if (!file.Open(lpszFileName, CFile::modeRead)) { return FALSE; } ---/ The code can result in failing to load an image if two instanses of a program will try to open the file.
I think you should change flags for CFile::Open
/---
CFile file;
if (! file.Open(lpszFileName, CFile::modeRead | CFile::shareDenyWrite)) { return FALSE; } ---/ |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |