Skip to content

Commit

Permalink
1.5.0.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
RudiDeVos committed Apr 13, 2024
1 parent 685402d commit 2efe98e
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 8 deletions.
7 changes: 7 additions & 0 deletions repeater/repeater.vcxproj
Expand Up @@ -168,6 +168,13 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/distributer.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>if exist c:\uvnc\sign.bat (
c:\uvnc\sign.bat "$(OutDir)$(TargetName)$(TargetExt)"
copy "$(OutDir)$(TargetName)$(TargetExt)" c:\uvnc\64\xp
)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
Expand Down
4 changes: 2 additions & 2 deletions setpasswd/setpasswd/setpasswd.vcxproj
Expand Up @@ -321,10 +321,10 @@
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IPV6|x64'">
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
Expand Down
1 change: 1 addition & 0 deletions vncviewer/UltraVNCHerperFunctions.cpp
Expand Up @@ -207,5 +207,6 @@ char * GetVersionFromResource(char *version)
}
}
}
strcat(version, (char* )"-dev");
return version;
}
5 changes: 0 additions & 5 deletions vncviewer/vncviewer.cpp
Expand Up @@ -348,13 +348,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR szCmdLin
{
HMODULE hUser32 = LoadLibrary(_T("user32.dll"));
HMODULE shcoreDLL = LoadLibrary("SHCORE.DLL");
<<<<<<< HEAD
//Min Vista
typedef BOOL(WINAPI *SetProcessDPIAwareFunc)();
=======
//Min Windows Vista
typedef BOOL(*SetProcessDPIAwareFunc)();
>>>>>>> Typo's and file header copyright fixes ( No code changes)
SetProcessDPIAwareFunc setDPIAwareF = NULL;
//Min Windows 8.1
typedef HRESULT(WINAPI *SetProcessDpiAwarenessFunc) (PROCESS_DPI_AWARENESS);
Expand Down
57 changes: 56 additions & 1 deletion winvnc/winvnc/vncabout.cpp
Expand Up @@ -37,6 +37,57 @@
// [v1.0.2-jp1 fix] Load resouce from dll
extern HINSTANCE hInstResDLL;

char* GetVersionFromResource(char* version)
{
HRSRC hResInfo;
DWORD dwSize;
HGLOBAL hResData;
LPVOID pRes, pResCopy;
UINT uLen = 0;
VS_FIXEDFILEINFO* lpFfi = NULL;
HINSTANCE hInst = ::GetModuleHandle(NULL);

hResInfo = FindResource(hInst, MAKEINTRESOURCE(1), RT_VERSION);
if (hResInfo)
{
dwSize = SizeofResource(hInst, hResInfo);
hResData = LoadResource(hInst, hResInfo);
if (hResData)
{
pRes = LockResource(hResData);
if (pRes)
{
pResCopy = LocalAlloc(LMEM_FIXED, dwSize);
if (pResCopy)
{
CopyMemory(pResCopy, pRes, dwSize);

if (VerQueryValue(pResCopy, ("\\"), (LPVOID*)&lpFfi, &uLen))
{
if (lpFfi != NULL)
{
DWORD dwFileVersionMS = lpFfi->dwFileVersionMS;
DWORD dwFileVersionLS = lpFfi->dwFileVersionLS;

DWORD dwLeftMost = HIWORD(dwFileVersionMS);
DWORD dwSecondLeft = LOWORD(dwFileVersionMS);
DWORD dwSecondRight = HIWORD(dwFileVersionLS);
DWORD dwRightMost = LOWORD(dwFileVersionLS);

sprintf(version, " %d.%d.%d.%d", dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost);
}
}

LocalFree(pResCopy);
}
}
}
}
strcat(version, (char*)"-dev");
return version;
}


HBITMAP
DoGetBkGndBitmap(IN CONST UINT uBmpResId )
{
Expand Down Expand Up @@ -180,7 +231,11 @@ vncAbout::DialogProc(HWND hwnd,
SetForegroundWindow(hwnd);

_this->m_dlgvisible = TRUE;

char version[50]{};
char title[256]{};
strcpy_s(title, "UltraVNC Server - ");
strcat_s(title, GetVersionFromResource(version));
SetDlgItemText(hwnd, IDC_VERSION, title);
return TRUE;
}

Expand Down

0 comments on commit 2efe98e

Please sign in to comment.