Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
cmake -G "Visual Studio 17 2022" -A $MsvcArch -DWITH_DOTNET=OFF -B $BuildDir
cmake --build $BuildDir --config Release
New-Item -ItemType Directory -Path "dependencies/MsRdpEx/$Arch" | Out-Null
@('MsRdpEx.dll','MsRdpEx.pdb','mstscex.exe','msrdcex.exe') | % {
@('MsRdpEx.dll','MsRdpEx.pdb','mstscex.exe','msrdcex.exe', 'vmconnectex.exe') | % {
Copy-Item "$BuildDir/Release/$_" "dependencies/MsRdpEx/$Arch"
}
Compress-Archive "dependencies\MsRdpEx\$Arch\*.pdb" ".\symbols\MsRdpEx-$PackageVersion-$Arch.symbols.zip" -CompressionLevel Optimal
Expand Down
10 changes: 10 additions & 0 deletions dll/Paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ static char g_DEFAULT_RDP_PATH[MSRDPEX_MAX_PATH] = { 0 };

static char g_XMF_DLL_PATH[MSRDPEX_MAX_PATH] = { 0 };

static char g_VMCONNECT_EXE_PATH[MSRDPEX_MAX_PATH] = { 0 };

bool MsRdpEx_PathCchRenameExtension(char* pszPath, size_t cchPath, const char* pszExt)
{
size_t length = strlen(pszPath);
Expand Down Expand Up @@ -273,6 +275,10 @@ bool MsRdpEx_InitPaths(uint32_t pathIds)
}
}

if (pathIds & MSRDPEX_VMCONNECT_EXE_PATH) {
MsRdpEx_ExpandEnvironmentStrings("%SystemRoot%\\System32\\vmconnect.exe", g_VMCONNECT_EXE_PATH, MSRDPEX_MAX_PATH);
}

return true;
}

Expand Down Expand Up @@ -333,6 +339,10 @@ const char* MsRdpEx_GetPath(uint32_t pathId)
case MSRDPEX_XMF_DLL_PATH:
path = (const char*) g_XMF_DLL_PATH;
break;

case MSRDPEX_VMCONNECT_EXE_PATH:
path = (const char*) g_VMCONNECT_EXE_PATH;
break;
}

return path;
Expand Down
3 changes: 3 additions & 0 deletions dll/RdpProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ class CMsRdpExProcess : public IMsRdpExProcess
else if (MsRdpEx_StringIEquals(appName, "msrdc") || MsRdpEx_StringIEquals(appName, "msrdc.exe")) {
appPathId = MSRDPEX_MSRDC_EXE_PATH;
}
else if (MsRdpEx_StringIEquals(appName, "vmconnect") || MsRdpEx_StringIEquals(appName, "vmconnect.exe")) {
appPathId = MSRDPEX_VMCONNECT_EXE_PATH;
}
}

const char* lpApplicationName = appName;
Expand Down
1 change: 1 addition & 0 deletions exe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

add_subdirectory(mstscex)
add_subdirectory(msrdcex)
add_subdirectory(vmconnectex)
17 changes: 17 additions & 0 deletions exe/vmconnectex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# vmconnectex launcher executable

windows_rc_generate_version_info(
NAME "vmconnectex" TYPE "EXE"
VERSION "${MSRDPEX_VERSION}"
FILENAME "vmconnectex.exe"
VENDOR "${MSRDPEX_VENDOR}"
COPYRIGHT "${MSRDPEX_COPYRIGHT}"
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.rc)

source_group("Resources" FILES vmconnectex.rc)

add_executable(vmconnectex WIN32
vmconnectex.cpp
vmconnectex.rc)

target_link_libraries(vmconnectex MsRdpEx_Dll)
11 changes: 11 additions & 0 deletions exe/vmconnectex/vmconnectex.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#include "../dll/AxHost/RdpWinMain.h"

int WINAPI wWinMain(
_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nShowCmd)
{
return MsRdpEx_WinMain(hInstance, hPrevInstance, lpCmdLine, nShowCmd, "vmconnect");
}
Binary file added exe/vmconnectex/vmconnectex.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions exe/vmconnectex/vmconnectex.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

IDI_APP_ICON ICON "vmconnectex.ico"

#include "version.rc"
1 change: 1 addition & 0 deletions include/MsRdpEx/MsRdpEx.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ HMODULE MsRdpEx_LoadLibrary(const char* filename);
#define MSRDPEX_MODULE_DIR_PATH 0x00002000
#define MSRDPEX_LIBRARY_DIR_PATH 0x00004000
#define MSRDPEX_XMF_DLL_PATH 0x00008000
#define MSRDPEX_VMCONNECT_EXE_PATH 0x00010000
#define MSRDPEX_ALL_PATHS 0xFFFFFFFF

bool MsRdpEx_InitPaths(uint32_t pathIds);
Expand Down
5 changes: 5 additions & 0 deletions installer/MsRdpEx.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
</Extension>
</ProgId>
</Component>
<Component Guid="beb220dc-b822-49bf-90c7-62153f6980f2">
<File Id="vmconnectex.exe" Source="$(var.BinDir)\vmconnectex.exe" KeyPath="yes">
<Shortcut Name="vmconnectex" Directory="ProgramMenuFolder" WorkingDirectory="INSTALLDIR" Icon="vmconnectex.ico" Advertise="yes" />
</File>
</Component>
<Component Guid="17d5f23d-df19-42e2-bd40-7db9306fac2b">
<File Source="$(var.BinDir)\MsRdpEx.dll"></File>
</Component>
Expand Down
1 change: 1 addition & 0 deletions installer/Package.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<MajorUpgrade AllowSameVersionUpgrades="no" DowngradeErrorMessage="!(loc.DowngradeError)" />
<Icon Id="mstscex.ico" SourceFile="..\exe\mstscex\mstscex.ico" />
<Icon Id="msrdcex.ico" SourceFile="..\exe\msrdcex\msrdcex.ico" />
<Icon Id="vmconnectex.ico" SourceFile="..\exe\vmconnectex\vmconnectex.ico" />
<Property Id="ARPPRODUCTICON" Value="mstscex.ico" />
<Property Id="ARPHELPLINK" Value="$(var.InfoURL)" />
<MediaTemplate EmbedCab="yes" CabinetTemplate="MsRdpEx{0}.cab" />
Expand Down
Loading