The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,570 other followers

Archive for June 15th, 2016

How to overcome “Stuck while installing Visual Studio 2015 (Update for Microsoft Windows (KB2999226))” via – Stack Overflow

Posted by jpluimers on 2016/06/15

Visual Studio 2015 install stuck on

Visual Studio 2015 install stuck on “acquiring” KB2999226

I had exactly the same when installing Visual Studio 2015 on a Windows 7 x64 system: stuck on “Acquiring” the “Update for Microsoft Windows (KB2999226)”.

So as mentioned in the StackOverflow answers for the below question, I manually downloaded “Update for Windows 7 for x64-based Systems (KB2999226)” which you can get directly at https://download.microsoft.com/download/1/1/5/11565A9A-EA09-4F0A-A57E-520D5D138140/Windows6.1-KB2999226-x64.msu.

Be sure to quit both the Visual Studio 2015 installation as well as any (“automagically interfering” background Windows Updates), as otherwise you get this error:

--------------------------- Windows Update Standalone Installer --------------------------- Only one instance of wusa.exe is allowed to run. --------------------------- OK ---------------------------

---------------------------
Windows Update Standalone Installer
---------------------------
Only one instance of wusa.exe is allowed to run.
---------------------------
OK
---------------------------

If you still get that error, then

  • try to stop/start the wuauserv service: usually it gets rid of the error.
  • When it still occurs, try a clean boot, then re-apply the KB.

Applying the KB can take a long while, even on fast hardware.

–jeroen

Source: Stuck while installing Visual Studio 2015 (Update for Microsoft Windows (KB2999226)) – Stack Overflow

Posted in .NET, Development, Software Development, Visual Studio 2015, Visual Studio and tools | Leave a Comment »

How to: Set a Thread Name in Native Code

Posted by jpluimers on 2016/06/15

This is what the Delphi TThread.NameThreadForDebugging is based on:

//
// Usage: SetThreadName (-1, "MainThread");
//
#include <windows.h>
const DWORD MS_VC_EXCEPTION=0x406D1388;

#pragma pack(push,8)
typedef struct tagTHREADNAME_INFO
{
   DWORD dwType; // Must be 0x1000.
   LPCSTR szName; // Pointer to name (in user addr space).
   DWORD dwThreadID; // Thread ID (-1=caller thread).
   DWORD dwFlags; // Reserved for future use, must be zero.
} THREADNAME_INFO;
#pragma pack(pop)

void SetThreadName( DWORD dwThreadID, char* threadName)
{
   THREADNAME_INFO info;
   info.dwType = 0x1000;
   info.szName = threadName;
   info.dwThreadID = dwThreadID;
   info.dwFlags = 0;

   __try
   {
      RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
   }
   __except(EXCEPTION_EXECUTE_HANDLER)
   {
   }
}

–jeroen

Posted in C++, Delphi, Development, Software Development | Leave a Comment »

 
%d bloggers like this: