mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-08-17 03:46:56 +08:00
better print
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@ -22,21 +22,21 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
HINSTANCE hInstance = LoadLibraryA("librustdesk.dll");
|
||||
if (!hInstance)
|
||||
{
|
||||
std::cout << "Failed to load librustdesk.dll" << std::endl;
|
||||
std::cout << "Failed to load librustdesk.dll." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
FUNC_RUSTDESK_CORE_MAIN rustdesk_core_main =
|
||||
(FUNC_RUSTDESK_CORE_MAIN)GetProcAddress(hInstance, "rustdesk_core_main_args");
|
||||
if (!rustdesk_core_main)
|
||||
{
|
||||
std::cout << "Failed to get rustdesk_core_main" << std::endl;
|
||||
std::cout << "Failed to get rustdesk_core_main." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
FUNC_RUSTDESK_FREE_ARGS free_c_args =
|
||||
(FUNC_RUSTDESK_FREE_ARGS)GetProcAddress(hInstance, "free_c_args");
|
||||
if (!free_c_args)
|
||||
{
|
||||
std::cout << "Failed to get free_c_args" << std::endl;
|
||||
std::cout << "Failed to get free_c_args." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
std::vector<std::string> command_line_arguments =
|
||||
@ -50,7 +50,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
char** c_args = rustdesk_core_main(&args_len);
|
||||
if (!c_args)
|
||||
{
|
||||
std::cout << "Rustdesk core returns false, exiting without launching Flutter app" << std::endl;
|
||||
std::string args_str = "";
|
||||
for (const auto& argument : command_line_arguments) {
|
||||
args_str += (argument + " ");
|
||||
}
|
||||
std::cout << "Rustdesk [" << args_str << "], core returns false, exiting without launching Flutter app." << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
std::vector<std::string> rust_args(c_args, c_args + args_len);
|
||||
|
Reference in New Issue
Block a user