10#define WIN32_NO_STATUS
18#define NUM_ATTRIBUTES 28
89 *(
dest++) = *(
string++);
106 static const WCHAR str_root[] = {
'\\',0};
146 DWORD checks = 0, carry = 0;
168 carry = (checks & 1) ? 0x80000000 : 0;
241 static const WCHAR str_tinfo[] = {
'\\',
'V',
'a',
'r',
'F',
'i',
'l',
'e',
'I',
'n',
'f',
'o',
'\\',
'T',
'r',
'a',
'n',
's',
'l',
'a',
't',
'i',
'o',
'n',0};
242 static const WCHAR str_trans[] = {
'\\',
'S',
't',
'r',
'i',
'n',
'g',
'F',
'i',
'l',
'e',
'I',
'n',
'f',
'o',
'\\',
'%',
'0',
'4',
'x',
'%',
'0',
'4',
'x',
'\\',
'%',
'%',
's',0};
243 static const WCHAR str_CompanyName[] = {
'C',
'o',
'm',
'p',
'a',
'n',
'y',
'N',
'a',
'm',
'e',0};
244 static const WCHAR str_FileDescription[] = {
'F',
'i',
'l',
'e',
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'i',
'o',
'n',0};
245 static const WCHAR str_FileVersion[] = {
'F',
'i',
'l',
'e',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
246 static const WCHAR str_InternalName[] = {
'I',
'n',
't',
'e',
'r',
'n',
'a',
'l',
'N',
'a',
'm',
'e',0};
247 static const WCHAR str_LegalCopyright[] = {
'L',
'e',
'g',
'a',
'l',
'C',
'o',
'p',
'y',
'r',
'i',
'g',
'h',
't',0};
248 static const WCHAR str_OriginalFilename[] = {
'O',
'r',
'i',
'g',
'i',
'n',
'a',
'l',
'F',
'i',
'l',
'e',
'n',
'a',
'm',
'e',0};
249 static const WCHAR str_ProductName[] = {
'P',
'r',
'o',
'd',
'u',
'c',
't',
'N',
'a',
'm',
'e',0};
250 static const WCHAR str_ProductVersion[] = {
'P',
'r',
'o',
'd',
'u',
'c',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
257 WCHAR translation[128] = {0};
267 SHIM_ERR(
"Error retrieving FILEINFO structure\n");
270 mapping_end = mapped.
view + mapped.
size;
289 ULONG export_dir_size;
319 ((
DWORD)
headers->OptionalHeader.MajorImageVersion) << 16 |
headers->OptionalHeader.MinorImageVersion);
351 if (
n != 16 &&
n != 26)
358 if ((
PBYTE)(os2 + 1) <= mapping_end)
361 if (
ptr <= mapping_end && (
ptr + 1 + *
ptr) <= mapping_end)
364 if (
ptr <= mapping_end && (
ptr + 1 + *
ptr) <= mapping_end)
370 *attr_info_ret = attr_info;
ACPI_SIZE strlen(const char *String)
struct tagATTRINFO * PATTRINFO
#define ATTRIBUTE_AVAILABLE
PWSTR SdbpStrDup(LPCWSTR string)
#define IMAGE_DIRECTORY_ENTRY_EXPORT
struct _IMAGE_EXPORT_DIRECTORY * PIMAGE_EXPORT_DIRECTORY
#define RtlImageDirectoryEntryToData
static const WCHAR version[]
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLenum GLenum mapping
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define TAG_UPTO_BIN_FILE_VERSION
#define TAG_ORIGINAL_FILENAME
#define TAG_LINKER_VERSION
#define TAG_16BIT_DESCRIPTION
#define TAG_UPTO_LINK_DATE
#define TAG_FILE_DESCRIPTION
#define TAG_BIN_FILE_VERSION
#define TAG_UPTO_BIN_PRODUCT_VERSION
#define TAG_LEGAL_COPYRIGHT
#define TAG_16BIT_MODULE_NAME
#define TAG_BIN_PRODUCT_VERSION
#define TAG_INTERNAL_NAME
#define TAG_PRODUCT_VERSION
static export_section_t export_dir
#define IMAGE_OS2_SIGNATURE_LE
#define IMAGE_NT_SIGNATURE
#define IMAGE_OS2_SIGNATURE
#define IMAGE_DOS_SIGNATURE
void WINAPI SdbpCloseMemMappedFile(PMEMMAPPED mapping)
BOOL WINAPI SdbpOpenMemMappedFile(LPCWSTR path, PMEMMAPPED mapping)
BOOL WINAPI SdbFreeFileAttributes(PATTRINFO attr_info)
static void WINAPI SdbpSetQWORDAttr(PATTRINFO attr, TAG tag, QWORD value)
static void SdbpReadFileVersion(PATTRINFO attr_info, PVOID file_info)
static DWORD WINAPI SdbpGetModuleType(PMEMMAPPED mapping, PIMAGE_NT_HEADERS *nt_headers)
static DWORD WINAPI SdbpCalculateFileChecksum(PMEMMAPPED mapping)
static void WINAPI SdbpSetAttrFail(PATTRINFO attr)
static WCHAR *WINAPI SdbpGetStringAttr(LPWSTR translation, LPCWSTR attr, PVOID file_info)
static void WINAPI SdbpSetStringAttr(PATTRINFO attr, TAG tag, WCHAR *string)
static void WINAPI SdbpSetStringAttrFromAnsiString(PATTRINFO attr, TAG tag, PBYTE string, size_t len)
static void WINAPI SdbpSetDWORDAttr(PATTRINFO attr, TAG tag, DWORD value)
BOOL WINAPI SdbGetFileAttributes(LPCWSTR path, PATTRINFO *attr_info_ret, LPDWORD attr_count)
static void WINAPI SdbpSetStringAttrFromPascalString(PATTRINFO attr, TAG tag, PBYTE string)
#define SHIM_ERR(fmt,...)
vector< Header * > headers
#define TAG_TYPE_STRINGREF
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
struct _IMAGE_OS2_HEADER * PIMAGE_OS2_HEADER