Tag Archives: Windows

64-bit CacheSet

SysInternals CacheSet has a limitation: it is unable to set a cache size larger than 4GB. This is due to the fact that it is a 32-bit application, and the respective API (NtSetSystemInformation) accepts new settings as a 32-bit byte count.

The solution: use the 64-bit API, which uses 64-bit integers. I’ve written a very simple 64-bit CacheSet-alike – just enter the desired cache size (in bytes). You can use the original CacheSet to check the new settings (just don’t hit “Apply”, or your settings might get clobbered).

Source, download.

Fixing DirectMusic on some 64-bit Windows versions

If you’re getting error messages such as “No sound device detected. Sounds might not play.” or “Failed to create Direct Music Performance.” when running Game Maker games, the following may help you. Here’s what I did to fix them on my system:

  1. Download the DirectX redistributable
  2. Unpack it
  3. Unpack dxnt.cab
  4. In dmusic.inf, search and replace “HKCR,” with “HKCR,Wow6432Node\
  5. Install the edited dmusic.inf (from the right-click menu)
  6. Copy missing DLLs (dm*.dll) to %WINDIR%/SysWOW64.

That’s it! The same method could work for other DirectX components as well.

Why is the amount of text I can type in my combo box limited by its width?

Once in a while you’ll stumble upon a combo box which doesn’t allow you to type past the right edge of the control. When normally typing more text would just scroll the contents, you’ll just get back an annoying beep. The amount of text you can enter is actually bound by the on-screen width of the text – thus, you may be able to enter 125 “i” characters, but only 25 “W” characters.

The cause of the problem is that the combo box was not created with the CBS_AUTOHSCROLL style:

CBS_AUTOHSCROLL
Automatically scrolls the text in the edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed.

Visual Studio’s resource editor has a different name and description for this property:

Auto
Automatically scrolls text to the left when the user types a character at the end of the line.