Category Archives: Microsoft

How to: Migrating a CLR console Visual C++ project to Windows Forms

Note: Windows Forms programming in new development is discouraged by Microsoft at this point as Microsoft wants to make full use of hardware accelerated drawing instead of using the CPU-intensive GDI. But maintaining old Windows Forms code in Visual C++ 2012 is … Continue reading

Rate this:

Posted in C++/CLI, enmsdn, Microsoft, Visual C++, Visual Studio | Tagged , , , | 2 Comments

Add the correct interface first in Adding an MFC Class from an ActiveX Control wizard.

In good old times aka VC6, if you want to use an ActiveX in MFC, the Components and Controls Gallery would generate all the properties and methods of an ActiveX and pull dependent types and create wrapper classes for them as … Continue reading

Rate this:

Posted in enmsdn, MFC, Microsoft, Microsoft Foundation Class Library, Visual C++, Visual Studio | Tagged , , , | Leave a comment

Howto: reset IE security zone settings programmatically

Internet Explorer 7 introduced the IInternetZoneManagerEx2 interface, which has a FixUnsecureSettings method to reset all security zone settings. Like all other IInternetZoneManager* interfaces, you can query this interface from the internet zone manager object: IInternetZoneManagerEx2* pzoneManager=NULL; HRESULT hr=CoCreateInstance(CLSID_InternetZoneManager ,NULL,CLSCTX_INPROC_SERVER,IID_IInternetZoneManagerEx2,(LPVOID*)&pzoneManager); if(hr==S_OK && pzoneManager!=NULL) { … Continue reading

Rate this:

Posted in enmsdn, Microsoft, Visual C++, Visual Studio, Webbrowser control | Tagged , , | 1 Comment

What’s new in MFC/ATL 11 Beta

Note this post is on Visual Studio 11 Beta, you can download it from http://www.microsoft.com/visualstudio/11/en-us/downloads Since Sinofsky posted about no desktop apps on Windows on ARM (WOA), it looks like MFC and ATL are going to support metro-style apps, although … Continue reading

Rate this:

Posted in Visual C++ | Tagged , , , | Leave a comment

Choosing formats when putting data on clipboard

The topic is from a forum discussion at http://social.msdn.microsoft.com/Forums/en/windowssdk/thread/94bb2db4-3ca2-4cd8-9f7c-6dd9aab6fd18 Generally an application should provide data in as many formats as possible so more applications can recognize the data. For example, IE stores text data in CF_UNICODETEXT, CF_TEXT and CF_HTML formats. Because … Continue reading

Rate this:

Posted in enmsdn, Webbrowser control | Tagged | Leave a comment

What’s new in Windows 8 Developer Preview SDK headers

This is by no means a complete list but just some observation on files that caught my eye. Some are just regular header file updates for Windows 7 and does not necessary require Windows 8. Some other APIs moved to … Continue reading

Rate this:

Posted in enmsdn, Microsoft, Visual C++ | Tagged , , , , , | Leave a comment

Windows Update KB2538242 or KB2538243 offered repeatedly

Recently there is an outburst of posts related to the KB2538242 update being offered repeatedly on MSDN’s Visual C++ forums, TechNet’s various Windows security forums and the Windows Update forum on Microsoft Answers forums. Questions about KB2538243 appear as well, … Continue reading

Rate this:

Posted in Microsoft, Visual C++ | Tagged , , , | 3 Comments

Bug in Security Update for Visual C++ Redistributable Package: April 12, 2011 causes program error on Windows 2000

Update:Microsoft’s Visual C++ team has released workarounds on the problem. AVG has released an utility that can revert the KB2467175 update, downloadable at http://twitter.blog.avg.com/2011/04/avg-feedback-update-26411.html Avira is reporting that its AntiVir software throws “The procedure entry point FindActCtxSectionStringW could not be located in the dynamic … Continue reading

Rate this:

Posted in enmsdn, MFC, Microsoft, Visual C++, Visual Studio | Tagged , , , , | 10 Comments

How to solve LNK2001 errors related to Windows SDK CLSIDs

User IMFCoder wants to know how to solve a LNK2001 error related to CLSID_CMpeg4sDecMediaObject. The user has no problem linking a lib file in the project but couldn’t find which lib the CLSID is in. The Windows SDK is strangely … Continue reading

Rate this:

Posted in enmsdn, Microsoft, Visual C++, Visual Studio | Tagged , , | Leave a comment

More ADO issues with KB983246/Windows 7 SP1: a reference count leaking when event is used

Update: Microsoft fixed the issue in Windows 8. User Angus Robertson is reporting that in an application that references ADO 2.1 type library and getting records using the adAsyncExecute method, each execute call  leaks three handles and about 20K of memory. A fix … Continue reading

Rate this:

Posted in Microsoft | Tagged , | Leave a comment