diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-23 00:35:18 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-23 00:54:06 +0200 |
commit | 5759fc6c7cc428c319de95e4702ecda9afd2b085 (patch) | |
tree | 27aff5577bda07dca83df7c9720aafc9663934c9 /tools/source/stream/strmwnt.cxx | |
parent | 8b6ca219b79f97d6f32b6ca3f1ec8f4bf68ad741 (diff) |
Make GetFileHandle's return type match declaration
But as the return type is just 32 bits, it is actually not enough for
a HANDLE anyway on a 64-bit OS. But on the other hand, this method is
private and not used on Windows at all. So just make it abort() then.
Diffstat (limited to 'tools/source/stream/strmwnt.cxx')
-rw-r--r-- | tools/source/stream/strmwnt.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 77f5f020b32b..992bad47e62a 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -177,9 +177,17 @@ SvFileStream::~SvFileStream() |* *************************************************************************/ -ULONG SvFileStream::GetFileHandle() const +sal_uInt32 SvFileStream::GetFileHandle() const { - return (ULONG)pInstanceData->hFile; + // Note that this method is broken on 64-bit as it would return + // only the lower 32 bits of a file handle. (As such, it might be + // that on 64-bit Windows, even in a 64-bit process, the upper 32 + // bits of handles are always zero? But surely we should not rely + // on that.) On the other hand, this method is private in + // SvFileStream and isn't used anywhere for Windows. So make sure + // it doesn't get used in the future either, just abort(). + abort( ); + return 0; } /************************************************************************* |