fix a bug that incorrect BMP header processing(#179)

This commit is contained in:
Jinhao
2017-01-15 20:45:14 +08:00
parent ac40ee41ce
commit 880a91b717
2 changed files with 136 additions and 249 deletions

View File

@@ -845,7 +845,7 @@ namespace nana { namespace experimental { namespace filesystem
GetFileSizeEx_fptr_t get_file_size_ex = reinterpret_cast<GetFileSizeEx_fptr_t>(::GetProcAddress(::GetModuleHandleA("Kernel32.DLL"), "GetFileSizeEx"));
if (get_file_size_ex)
{
HANDLE handle = ::CreateFile(p.c_str(), GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
HANDLE handle = ::CreateFile(p.c_str(), GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (INVALID_HANDLE_VALUE != handle)
{
LARGE_INTEGER li;