chore: initial commit (extracted from Launchers monorepo)

Plugin: ns7zip v2.0.0
Architectures: x86-ansi, x86-unicode, amd64-unicode
License: LGPL-2.1-or-later
This commit is contained in:
Simone
2026-04-29 14:07:51 +02:00
commit d074cc7c07
3848 changed files with 1076682 additions and 0 deletions
@@ -0,0 +1,37 @@
// Windows/PropVariantConv.h
#ifndef __PROP_VARIANT_CONV_H
#define __PROP_VARIANT_CONV_H
#include "../Common/MyTypes.h"
// provide at least 32 bytes for buffer including zero-end
#define kTimestampPrintLevel_DAY -3
// #define kTimestampPrintLevel_HOUR -2
#define kTimestampPrintLevel_MIN -1
#define kTimestampPrintLevel_SEC 0
#define kTimestampPrintLevel_NTFS 7
bool ConvertUtcFileTimeToString(const FILETIME &ft, char *s, int level = kTimestampPrintLevel_SEC) throw();
bool ConvertUtcFileTimeToString(const FILETIME &ft, wchar_t *s, int level = kTimestampPrintLevel_SEC) throw();
// provide at least 32 bytes for buffer including zero-end
// don't send VT_BSTR to these functions
void ConvertPropVariantToShortString(const PROPVARIANT &prop, char *dest) throw();
void ConvertPropVariantToShortString(const PROPVARIANT &prop, wchar_t *dest) throw();
inline bool ConvertPropVariantToUInt64(const PROPVARIANT &prop, UInt64 &value)
{
switch (prop.vt)
{
case VT_UI8: value = (UInt64)prop.uhVal.QuadPart; return true;
case VT_UI4: value = prop.ulVal; return true;
case VT_UI2: value = prop.uiVal; return true;
case VT_UI1: value = prop.bVal; return true;
case VT_EMPTY: return false;
default: throw 151199;
}
}
#endif