25 March 2010 0 Comments

To the command line enthusiasts: Some quick know-hows for Upgrading to VS 2010

Hello, I am Renin John, a Software Development Engineer in Test from the VC++ Project and Build team. I am aware that some of you prefer to do your daily work from the command prompt rather than from the IDE.

24 February 2010 0 Comments

Squeezing performance out of memcmp usage

When I wrote this the other day it made me think of another thing involving the memcmp function and the VC compiler. In the code I’ve seen over the years where memcmp was used it was always to find out if an area was identical or not.

19 February 2010 0 Comments

A new unit test framework for C++

Today I learned about something I did not expected.

28 January 2010 0 Comments

Q: Why Doesn’t Drag-and-Drop work when my Application is Running Elevated? – A: Mandatory Integrity Control and UIPI

If you run notepad elevated (Right click | Run as Administrator), and you try and drag-and-drop a file from Windows Explorer, nothing happens. It looks like it is going to work because the pointer icon changes but the file doesn’t open. Weird, huh

5 January 2010 0 Comments

Using the “secret” Windows 7 Problem Step Recorder to Create Step by Step Screenshot Documents

When I show this tool to developers or QA guys, their eyes light up with excitement.

26 December 2009 1 Comment

VPC Image Visual Studio 2010 a TFS 2010 Beta 2

Virtuální obrazy Microsoft Microsoft Visual Studio 2010 Ultimate a Team Foundation Server 2010 Beta2 jsou ke stažení:   Microsoft® Visual Studio® 2010 and Team Foundation Server® 2010 Beta 2 virtual image for Windows Virtual PC http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=27d91e63-e33b-4cef-a331-f20d343da9de Microsoft® Visual Studio® 2010 and Team Foundation Server® 2010 Beta 2 virtual image for Windows Server 2008 Hyper-V http://www.microsoft.com/downloads/details.aspx?FamilyID=426cdffc-53b5-46a5-89d3-e2ecd23570c6&displayLang=en Microsoft® Visual Studio® 2010 and Team Foundation Server® 2010 Beta 2 for Microsoft® Virtual PC 2007 SP1 Image http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=540777b0-cbd7-485e-bde5-23a1d4f442e0 První je optimalizován pro Windows 7 s 3GB volné paměti, druhý pro Hyper-V třetí pro VPC 2007. Buri

10 November 2009 0 Comments

PDC 09, j’y serai !

Comme pas tout les ans, mais uniquement quand il y a des annonces clés pour les développeurs, la PDC09 se tiendra la semaine prochaine à Los Angeles. Comme a chaque fois que je peux… j’y serai.

7 November 2009 0 Comments

Using Password Minder to Manage Your Passwords

I started using Password Minder almost immediately after reading about it in the July 2004 edition of MSDN Magazine. I don’t know about you, but trying to remember all of my various passwords for dozens of Web sites, numerous network accounts, VMs, etc

21 September 2009 0 Comments

/DYNAMICBASE和/NXCOMPAT

大家好,我叫范翔。我是微软 C++ 上海团队的一名软件开发工程师。 今天我想向大家介绍一下两个和安全性相关的链接器选项: /DYNAMICBASE 和 /NXCOMPAT 。   这两个选项是在 VS2005 中引入的,目的是提高本机代码的安全性。   您可以在 IDE 中设置它们: 这两个选项在 IDE 中有三个可选值: On , Off 和 Default 。   如果你是用 VS2008 的向导生成的 C++ 工程,那么它们会被设置为 “On” 。 当 VS2008 从不支持这两个选项的老版本工程进行升级时 ,会将这两个选项设置为“ Off ”。 如果您选择“ Default ”,链接器的默认值是“ Off ”。   经过多年的推广,我们决定在 VS2010 中将“ Default ”对应的值改为“ On ”,以增强 C++ 应用程序的安全性。   下面是对这两个选项的详细介绍:   1.       DYNAMICBASE   /DYNAMICBASE 使用 Windows Vista 的地址空间布局随机化 ASLR ( Address Space Layout Randomization ) 功能,指定是否生成可在加载时随机重新设定基址的可执行文件映像。 该选项隐含了“ /FIXED:NO ”,以便在可执行文件中生成重定位节。 具体请参见 /FIXED 中的说明。   默认情况下,如果某个组件需要 Windows Vista ( /SUBSYSTEM 6.0 和更高版本 ) ,则会自动打开 /DYNAMICBASE 。 /DYNAMICBASE:NO 可以用于禁用随机重新设定基址。   这篇文件对 ASLR 进行了介绍: http://technet.microsoft.com/zh-cn/magazine/cc162458.aspx ASLR 仅被 Windows Vista 和之后的操作系统支持,它会被之前的操作系统忽略。   ASLR 对于应用程序来说是透明的。当开启 ASLR 的时候,唯一的区别是,操作系统将会无条件的对可执行文件重新设定基址。如果未开启 ASLR ,只有当发生地址冲突的时候,操作系统才会重新设定基址。   2.       NXCOMPAT   /NXCOMPAT 用于指定可执行文件与 Windows 数据执行保护功能 DEP ( Data Execution Prevention )兼容 请注意,该选项只适用于 32 位的可执行文件。非 32 位的桌面版 Windows (比如 x64 和 IA64 )总是会为 64 位的应用程序开启 DEP 。   下面是对 DEP 的详尽介绍: http://support.microsoft.com/kb/875352   默认情况下,如果某个组件需要 Windows Vista ( /SUBSYSTEM 6.0 和更高版本 ) ,则会自动打开 /NXCOMPAT 。 /NXCOMPAT:NO 可以用于指定应用程序和 DEP 不兼容。然而,管理员仍然可以强制为所有的应用程序开启 DEP 。因此,您总是应当测试您的程序和 DEP 的兼容性。   Windows Vista SP1 、 Windows XP SP3 和 Windows Server 2008 增加了一个新的 API SetProcessDEPPolicy 。它允许开发人员在运行时而不是链接的时候设置程序的 DEP 策略。具体的信息请参考下面的链接: http://blogs.msdn.com/michael_howard/archive/2008/01/29/new-nx-apis-added-to-windows-vista-sp1-windows-xp-sp3-and-windows-server-2008.aspx   下面列举了常见的和 DEP 不兼容的例子(更详细的信息请参见 http://msdn.microsoft.com/en-us/library/aa366553.aspx ) a

16 September 2009 0 Comments

App-V 4.5 und das neue VC++ Paket.

Hallo zusammen, mit dem Security Bulletin MS09-035 hat Microsoft ein neues Visual C++ Redist. Package veröffentlicht. Somit liegen im Download Center drei Versionen des VC++ Paketes in der 2005er Ausführung: Microsoft Visual C++ 2005 Redistributable Package (x86) http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=200b2fd9-ae1a-4a14-984d-389c36f85647…( read more )

15 September 2009 0 Comments

Consider not using the Frame Pointer Optimization when building your software

Stack tracing is a very useful functionality for tracking both the causes of performance problems and reliability issues. With F rame P ointer O ptimization disabled , one can easily build the call chain by walking through the stack frame pointers.   Because of potential code size increase and performance degradation, I ndependent S oftware V endors tend to use the /Oy C++ compiler option when building their software.

11 September 2009 0 Comments

UI0Detect, WlS0WndH and a lie…

http://blogs.msdn.com/yvesdolc/archive/2009/09/11/ui0detect-wls0wndh-and-a-lie.aspx   In my prior to last entry , I took a shortcut: you Windows Service user interface can be seen on Windows Vista and still on Windows 7. But beware, it’s not by default, not without additional end user involvement and very likely to no longer be there under Windows 8 ! It’s all about the Interactive Service Detection Windows Service (%SystemRoot%System32 UI0Detect.exe) and the DLL injected in your service to detect if it displays anything in Session 0 (%SystemRoot%System32 WlS0WndH.dll and %SystemRoot%SysWOW64 WlS0WndH.dll) Instead of trying to repeat the excellent work that Alex Ionescu did in his blog, let me highly advise you to take the time to read it