2015-02-13 16:59:11 +03:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "Utility.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UINT ReadMSBWord(CArchive& ar, WORD& wValue)
|
|
|
|
|
{
|
2015-02-13 22:31:52 +03:00
|
|
|
char* pBuffer = reinterpret_cast<char*>(&wValue);
|
2015-02-14 13:39:47 +03:00
|
|
|
return (ar.Read(pBuffer + 1, 1) + ar.Read(pBuffer, 1));
|
2015-02-13 16:59:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UINT ReadMSBULong(CArchive& ar, ULONG& ulValue)
|
|
|
|
|
{
|
2015-02-13 22:31:52 +03:00
|
|
|
char* pBuffer = reinterpret_cast<char*>(&ulValue);
|
2015-02-14 13:39:47 +03:00
|
|
|
return (ar.Read(pBuffer + 3, 1) + ar.Read(pBuffer + 2, 1) +
|
|
|
|
|
ar.Read(pBuffer + 1, 1) + ar.Read(pBuffer, 1));
|
2015-02-13 16:59:11 +03:00
|
|
|
}
|