FCLT#81254 Native Excel XLSX About.version

svn path=/Slnkxlsx/trunk/; revision=63287
This commit is contained in:
Jos Groot Lipman
2024-01-22 13:11:37 +00:00
parent 745fccbfbe
commit e0af00d154
7 changed files with 68 additions and 4 deletions

View File

@@ -2,11 +2,14 @@
#include "stdafx.h"
#include "About.h"
#include "SLNKXLSXVersion.h"
// CAbout
extern HINSTANCE g_hInstance;
// In release mode verwijderen we altijd About.obj om hercompile te forceren
CString buildDATE(__DATE__);
CString buildTIME(__TIME__);
STDMETHODIMP CAbout::get_DLLPath(BSTR* pVal)
{
@@ -19,3 +22,34 @@ STDMETHODIMP CAbout::get_DLLPath(BSTR* pVal)
return S_OK;
}
STDMETHODIMP CAbout::get_Buildtime(BSTR* pVal)
{
CString result;
result.Format("%s, %s", buildDATE, buildTIME);
(*pVal) = result.AllocSysString();
return S_OK;
}
STDMETHODIMP CAbout::get_VersionMajor(LONG* pVal)
{
(*pVal) = SLNK_MAJOR_VERSION;
return S_OK;
}
STDMETHODIMP CAbout::get_VersionMinor(LONG* pVal)
{
(*pVal) = SLNK_MINOR_VERSION;
return S_OK;
}
STDMETHODIMP CAbout::get_VersionString(BSTR* pVal)
{
CString result = SLNK_BUILDVERSION;
(*pVal) = result.AllocSysString();
return S_OK;
}

View File

@@ -51,9 +51,11 @@ END_COM_MAP()
public:
STDMETHOD(get_DLLPath)(BSTR* pVal);
STDMETHOD(get_Buildtime)(BSTR* pVal);
STDMETHOD(get_VersionMajor)(LONG* pVal);
STDMETHOD(get_VersionMinor)(LONG* pVal);
STDMETHOD(get_VersionString)(BSTR* pVal);
};
OBJECT_ENTRY_AUTO(__uuidof(About), CAbout)

View File

@@ -16,6 +16,10 @@ import "ocidl.idl";
]
interface IAbout : IDispatch{
[propget, id(1)] HRESULT DLLPath([out, retval] BSTR* pVal);
[propget, id(3), helpstring("property Buildtime")] HRESULT Buildtime([out, retval] BSTR* pVal);
[propget, id(5), helpstring("property VersionMajor")] HRESULT VersionMajor([out, retval] LONG* pVal);
[propget, id(6), helpstring("property VersionMinor")] HRESULT VersionMinor([out, retval] LONG* pVal);
[propget, id(7), helpstring("property VersionString")] HRESULT VersionString([out, retval] BSTR* pVal);
};
[
object,

Binary file not shown.

View File

@@ -117,6 +117,12 @@
<PostBuildEvent>
<Command>$(SolutionDir)/signDLL.bat cZqePYo7d0 $(OutDir)$(TargetName)$(TargetExt)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>del $(IntDir)\About.obj</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Zodat buildtime bijgewerkt</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="About.cpp" />

View File

@@ -0,0 +1,18 @@
// Zorg dat versies alfabetisch altijd op elkaar volgen!
#define SLNK_MAJOR_VERSION 1
#define SLNK_MINOR_VERSION 00
#define SLNK_BUILD_VERSION 0
// Define resource strings
#define ECHO(a) #a
#define STRINGIZE_SLNK_BUILD(major, minor, build) ECHO(major) "," ECHO(minor) ",0," ECHO(build)
#define STRINGIZE_SLNK_FULL(major, minor) ECHO(major) "." ECHO(minor)
// Deze wordt gebruikt in SLNKDWF.RC2 en eindigt in Version Tab van de properties
// Daar conformeren we aan de standaard(?)
#define SLNK_BUILDVERSION STRINGIZE_SLNK_BUILD(SLNK_MAJOR_VERSION, SLNK_MINOR_VERSION, SLNK_BUILD_VERSION)
// Deze wordt in splashscherm getoond en in About-scherm
// Bovendien wordt DonShowSplashVersion hiervan afgeleid
// Ergo: Voor de eenvoud niet de BUILD_VERSION tonen aan eindgebruikers
#define SLNK_FULLVERSION STRINGIZE_SLNK_FULL(SLNK_MAJOR_VERSION, SLNK_MINOR_VERSION)

View File

@@ -25,7 +25,7 @@ oWs.write_number(1, 2, 123.45, 1);
oWs.write_unixtime(1, 3, new Date().getTime() / 1000, 0); // zonder tijdzone?
oWs.write_unixtime(1, 4, new Date().getTime() / 1000, 1);
oWs.write_unixtime(1, 5, new Date().getTime() / 1000, 2);
oWs.write_vardate(1, 6, new Date().getVarDate(), 0); // met tijdzone
oWs.write_vardate(1, 6, new Date().getVarDate(), 1); // met tijdzone
var len = oWs.write_string(3, 0, "29-11-2023 16:24"); // 157 moeten we ombouwen naar 15?
WScript.Echo("Lengte: " + len);