visual-studio-2012

Can a managed ref-class directly implement a COM interface?

社会主义新天地 提交于 2020-01-03 02:54:17
问题 Is there a built-in way to allow a managed ref-class to implement and expose a COM inerface that is safely callable from native code? Looking at the C# side, this is easily done by decorating the target interface with the proper COM-interop attributes, for example: Native Interface interface ISampleGrabberCB: public IUnknown { virtual STDMETHODIMP SampleCB( double SampleTime, IMediaSample *pSample ) = 0; virtual STDMETHODIMP BufferCB( double SampleTime, BYTE *pBuffer, long BufferLen ) = 0; };

Why does the text on my asynchronous ProgressBar flicker?

ぃ、小莉子 提交于 2020-01-03 02:01:26
问题 I want to display text on a ProgressBar , ( without all the nonsense of a custom progress bar). This is not hard to do, and does not involve the OnPaint method -- as demonstrated with button1 of the following code. However, this method blocks the UI thread, which is evil. Unfortunately, my best stab at an asynchronous approach causes the text to flicker, which is very annoying. Can somebody show me how to update the text asynchronously without the flicker? (To run the following code, just

Building on Windows XP, when development is on VS2012?

守給你的承諾、 提交于 2020-01-03 01:34:07
问题 We're planning moving from Visual Studio 2005 to Visual Studio 2012 (Visual-C++-11). (We would very much like to skip 2010 if we can help it, since the newer version is already there and offers a better C++ experience.) But we've hit a little roadblock: Our build servers still run Windows 2003r2 (all inside dedicated virtual machines), and due to messy tool support/issues, we're in no position to upgrade the build servers to a newer OS. Developers mostly have switched to Windows7 by now, so

Convert virtual spaces into real tabs in Visual Studio sdk

我的未来我决定 提交于 2020-01-03 01:25:11
问题 My Visual Studio extension, is arranging Tab Sizes using ITextParagraphPropertiesFactoryService interface. That class is doing a great job, and helps me to set tab widths for all existing lines, but I have a problem to set tab sizes for new virtual line. In other words, Visual Studio is setting caret position in VirtualSnapshotPoint , and converting it to real tabs only when user enters some symbols. Now, Is it possible to force Visual Studio to create real tabs instead of virtual spaces? I

Visual Studio- way to see the stack size growing whilst stepping through?

走远了吗. 提交于 2020-01-02 23:17:50
问题 I know the call stack window shows all the function calls, but is there a way to see the size of the stack grow/shrink whilst stepping through the code? I am using VS2012 Google just keeps returning how to increase the stack size... 回答1: The stack actually doesn't change size while running. Each thread has a specific Thread Stack Size which is compiled into the executable. There is no direct way to see the amount of the stack which is currently in use within the Visual Studio debugging

Add keyboard shortcut to open Builds view in Visual Studio 2012

点点圈 提交于 2020-01-02 14:55:25
问题 I am wondering if there is Visual Studio command for showing the Builds view in Team Explorer, so that I can bind a keyboard shortcut to it. For example, I was able to create CTRL + W , CTRL + G shortcut bound to View.TfsPendingChanges command which shows directly Pending Changes view within Team Explorer. EDIT: As it is not obvious from the answer, the command TeamFoundationContextMenus.Commands.GoToBuilds is the one I was looking for. 回答1: There is a command. Tools > Options > Environment >

Search for specific file name in directory

六眼飞鱼酱① 提交于 2020-01-02 10:24:15
问题 I'm trying to search for specific file name on all volumes on the system, except System Volume Information or Windows Directories and print out every full path for each file. I've tried to use Directory.GetFiles , but it only searche inside Drive C:\ or Drive D:\ (depends which drive is specified) How can I achieve my goal? For example I want to run program and search for file with name ".DS_Store" (used to use mac, and now my file system is full of these files....) I would really appreciate

Visual Studio 2012 Toolbars

≡放荡痞女 提交于 2020-01-02 08:28:11
问题 Does anyone know of a way to move the toolbars alongside the menu bar in VS2012? My setup currently looks like this: I like to maximise code space, but find the toolbars useful - so rather than hiding them I'd prefer to lift them up alongside the menubar, and/or do away with the title bar. Is this possible? 回答1: Here is one option, not exactly what you are asking for but it does accomplish the goal of saving real estate. It is a Visual Studio Extension allows you to hide the main menus when

How to fail build if test method fails?

廉价感情. 提交于 2020-01-02 08:12:52
问题 My Reference is this http://msdn.microsoft.com/de-de/library/ms182532.aspx Using Visual Studio. Lets say there is a Solution Project.SuperApp with some projects and one unit test project. If i want to run the tests i first have to build the solution and then run all tests from the Test-Explorer. Even if one test fails the software is already build and ready to deploy. Which seems like an error to me. With other tools like Maven if you want to build/package a software component the tests are

“The application was unable to start correctly (0xc000007b). Click ok to close the application.”

泪湿孤枕 提交于 2020-01-02 08:09:29
问题 I am getting the error message in the title on a VPS running Windows Server 2008 R2 Enterprise SP1 when I try to open Visual Studio 2010. Things were working fine in the beginning even after I installed SQL Server 2012 and VS 2013. In trying to resolve this, I found others who had this issue stating that the 32 bit version of the msvcp100, msvcp100d, msvcr100, msvcr100d, and msvcr100_clr0400 DLLs in the SysWOW64 folder were overwritten somehow with the 64 bit version. So, I downloaded the 32