visual-studio-2010

C++ Protect Process from being suspended

萝らか妹 提交于 2020-06-08 12:42:49
问题 Is there any possible way to protect an exe from being suspended ? Note that the i'm the owner of the application. 回答1: There are tools such as Sysinternals ProcessExpert that allows you to suspend any process. If the user has admin authorisations there is no way to avoid this. This SO answer shows three solutions to suspend a windows process. However there is a way to make this extremely difficult : the solution consist of having a shadow process for your application. The application and the

C++ Protect Process from being suspended

自作多情 提交于 2020-06-08 12:42:14
问题 Is there any possible way to protect an exe from being suspended ? Note that the i'm the owner of the application. 回答1: There are tools such as Sysinternals ProcessExpert that allows you to suspend any process. If the user has admin authorisations there is no way to avoid this. This SO answer shows three solutions to suspend a windows process. However there is a way to make this extremely difficult : the solution consist of having a shadow process for your application. The application and the

How to format Visual Studio XML documentation for display on the web

天涯浪子 提交于 2020-05-26 14:36:09
问题 I am using Visual Studio 2010 and have started being a good boy and documenting all my code as I write it, via XML comments. I have a well-documented project and I even figured out how to make Visual Studio spit out a complete XML document when doing a build. My question is, what is the best way to format/display this document on the web so that it appears in a nice friendly and usable format like MSDN? Is there a tool that does this easily? Thanks in advance! 回答1: Check out Sandcastle Help

Visual Studio complains that .exe is not found when compiling for debug

微笑、不失礼 提交于 2020-05-26 04:25:22
问题 I have a very simple C++ application. #include <stdio.h> #include <iostream> int main(int argc, char argv[]) { cout << "hi" << endl; } When I compile for the first time in debug mode, Visual Studio complains "Unable to start program ..\Debug\myprogram.exe. The system cannot find the file specified." However, I think that this is obvious because I am compiling for the first time, right? This executable should not exist yet, so why is Visual Studio balking at compiling? Thanks for your help.

Error displaying a WinForm in Design mode with a custom control on it

微笑、不失礼 提交于 2020-05-26 04:00:53
问题 I have a UserControl that is part of a Class library. I reference this project from my solution. This adds a control from the referenced project to my toolbox. I add tghe control to a form. Everything looks good, I compile all and run. Perfect... But when I close the .frm with the control on it and re-open it, I get this error. The code continues to run. It may have something to do with namespaces. The original namespace was simply "Design" and this was ambiguous and conflicting so i decided

Error displaying a WinForm in Design mode with a custom control on it

白昼怎懂夜的黑 提交于 2020-05-26 04:00:48
问题 I have a UserControl that is part of a Class library. I reference this project from my solution. This adds a control from the referenced project to my toolbox. I add tghe control to a form. Everything looks good, I compile all and run. Perfect... But when I close the .frm with the control on it and re-open it, I get this error. The code continues to run. It may have something to do with namespaces. The original namespace was simply "Design" and this was ambiguous and conflicting so i decided

Is it wrong to use special characters in C# source code, such as “ñ”?

丶灬走出姿态 提交于 2020-05-25 08:59:41
问题 Recently, using C#, I just declared a method parameters using the Latin character ñ , and I tried to build (compile) my entire solution and it works, therefore I was able to execute my program. But I'm curious to know if it is wrong to use special characters such as Latin characters in a source code written in C#? If it is wrong, why? Besides it is more legible and universal to write code in English, are there any other reason to not use special characters in a C# source code? 回答1: Let me

Can I specify the output path for the MSBuild <Content> tag?

狂风中的少年 提交于 2020-05-25 04:20:21
问题 Is it possible to specify a different folder for the output of the following file? <Content Include="test.stl"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> 回答1: A different output folder can be specified by using the Link metadata on None / Content items: <Content Include="test.stl"> <Link>some\folder\%(Filename)%(Extension)</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> When using wildcards in an include statement, this is also

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Visual studio 2010 and cmake

谁都会走 提交于 2020-05-15 04:06:48
问题 I have a project which i have generated with cmake and running in visual studio 2010.I changed the configuration to x64,in visual studio my active solution and the Target Machine in(Properties->Linker->Advanced) is set as x64.I still get the linker LNK1112 error.Is this something which i set in cmakelist.txt if so what is the command? -swetha 回答1: It's not something you'd want to set in CMakeLists.txt . Basically, CMake has multiple generators for different compilers. (The x86 and x64

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Visual studio 2010 and cmake

≡放荡痞女 提交于 2020-05-15 04:04:42
问题 I have a project which i have generated with cmake and running in visual studio 2010.I changed the configuration to x64,in visual studio my active solution and the Target Machine in(Properties->Linker->Advanced) is set as x64.I still get the linker LNK1112 error.Is this something which i set in cmakelist.txt if so what is the command? -swetha 回答1: It's not something you'd want to set in CMakeLists.txt . Basically, CMake has multiple generators for different compilers. (The x86 and x64