SyntaxHighlighter

Thursday, 21 May 2009

Debugging Win 7 Sleep problems

There is a great post by Michael Aulia

http://www.michaelaulia.com/blogs/fix-windows-vista7-sleep-mode-from-waking-up-by-itself.html


I had a slight problem getting it to work on Win 7. When I ran the command to disable waking with my keyboard I got

C:\Users\Ash>powercfg -DEVICEDISABLEWAKE "Microsoft USB Dual Receiver Wireless Keyboard (IntelliType Pro)"
You do not have permission to enable or disable device wake.
The answer is simple, you just need to run the command window as Administrator, i.e. Press windows key; Type cmd; Right click on cmd from the list and Run as Administrator.

By the way, my keyboard and mouse needed disabled as even if i didn't touch them it would wake the pc.

Wednesday, 20 May 2009

Getting a Samung Laser Printer to work in Windows 7

Figured out how to get my samsung laser printer working in Windows 7

All should then work nicely, but your milage may vary - good luck

Saturday, 9 May 2009

Visual Studio 2005-2008SP1 Upgrade Bug

Hi Folks,

I know its slightly daft to start a blog for a bug, but it cost me nearly a week of struggling to find, so hopefully it will help someone out :).

Visual Studio 2008SP1 does not upgrade projects correctly - it disables optimization in release mode.


The workaround is to set the "Optimization" setting in Project->Properties->Config Props->C/C++ to disabled, then back to /O2 (Maximise speed). This setting will now be bold which is how you know it is properly set.

If you get something like: -

11>e:\workspace\trunk\sirocco\main\code\networkengine\serverraknet.cpp(907) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
and you haven't explicitly turned off optimization with #pragma optimization( ... ), then you have the same problem as I had and your code is most likely running slowly.

They say this is fixed in VS 2010, but it's something to look out for while people are still using VS 2008, especially if you are adding a dependency that has a VS2005 project file

Hope this helps some googlers.
All the best,
Ash