equal
deleted
inserted
replaced
65 } |
65 } |
66 |
66 |
67 bool CSISContents::IsSisFile(const std::wstring& aFileName) |
67 bool CSISContents::IsSisFile(const std::wstring& aFileName) |
68 { |
68 { |
69 TSISStream input; |
69 TSISStream input; |
70 #ifdef __TOOLS2_LINUX__ |
|
71 std::wstring fileName = FixPathDelimiters(aFileName); |
70 std::wstring fileName = FixPathDelimiters(aFileName); |
72 #else |
|
73 std::wstring fileName = aFileName; |
|
74 #endif |
|
75 HANDLE file = ::MakeSISOpenFile(fileName.c_str(),GENERIC_READ,OPEN_EXISTING); |
71 HANDLE file = ::MakeSISOpenFile(fileName.c_str(),GENERIC_READ,OPEN_EXISTING); |
76 CSISException::ThrowIf ((INVALID_HANDLE_VALUE == file), |
72 CSISException::ThrowIf ((INVALID_HANDLE_VALUE == file), |
77 CSISException::EFileProblem, std::wstring (L"cannot open ") + fileName); |
73 CSISException::EFileProblem, std::wstring (L"cannot open ") + fileName); |
78 bool success = input.import (file, NULL); |
74 bool success = input.import (file, NULL); |
79 ::CloseHandle(file); |
75 ::CloseHandle(file); |
101 |
97 |
102 |
98 |
103 void CSISContents::Load (const std::wstring& aFileName, TUint64* size) |
99 void CSISContents::Load (const std::wstring& aFileName, TUint64* size) |
104 { |
100 { |
105 TSISStream input; |
101 TSISStream input; |
106 #ifdef __TOOLS2_LINUX__ |
|
107 std::wstring fileName = FixPathDelimiters(aFileName); |
102 std::wstring fileName = FixPathDelimiters(aFileName); |
108 #else |
|
109 std::wstring fileName = aFileName; |
|
110 #endif |
|
111 HANDLE file = ::MakeSISOpenFile(fileName.c_str(),GENERIC_READ,OPEN_EXISTING); |
103 HANDLE file = ::MakeSISOpenFile(fileName.c_str(),GENERIC_READ,OPEN_EXISTING); |
112 if (INVALID_HANDLE_VALUE == file) |
104 if (INVALID_HANDLE_VALUE == file) |
113 { |
105 { |
114 SISLogger::Log(L" Error : Cannot open file : "); |
106 SISLogger::Log(L" Error : Cannot open file : "); |
115 SISLogger::Log(fileName); |
107 SISLogger::Log(fileName); |