How to Check If My Processor is x86 (32-bit) or x64 (64-bit) in Windows?

There are many ways of checking if your processor is 64 bit or 32 bit on windows platform. 


I will be discussing the simplest and easy method which is full proof.  


Just open Command prompt and type 
                             SYSTEMINFO
 ( command is not case sensitive),  within a minute command prompt will be full with of information. you just have to search for "System Type :" This row will tell you your processor type as shown in below image. 


  

Error : The value of ESP was not properly saved across a function call.

Sometimes you may face such a error while executing your program written in C++: 
  
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.
or 
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.


The above mentioned error you will get only if you are running program compiled in debug mode. If the program is compiled in release mode you will get Exception code: 0xc0000005 which is Access Violation exception. 


Cause of error:


Consider a situation,  you have declared one function with one calling convention ( for example __cdecl ). You do LoadLibrary, get the proc address, now if you are calling function with other  calling convention such as ( __stdcall ) by mistake. Function executed, your task completed sucessfully. Everything will work fine until  you try to use the return value of the function.


The error Access Violation occurred because you have declared function with __cdecl calling convention, means function has its own stack clean up code. And you are trying to access the function with __stdcall which means, function does not code to cleanup the stack, so compiler will insure that after function returns the callee will celanup the stack, which eventually means there are two stack cleaner exists. 
Now function execution will complete as expected but then the time will come to assign the value of return variable which is present in the ESP register due to two cleanup codes the second time asses to the ESP will be evaluated in the exception as register is already cleaned by one of the cleaner. 

How to enable Hibernate option on Windows 7

Hibernating is good option when you want to stop and resume your work from some point where you had off your computer/laptop.  


Windows 7 by default you will see only following options in the under Shut Down option. 




To enable hibernate you will need to carry following steps:


1. Launch the command prompt under administrator user.  To do this Search cmd on start menu. Right click cmd any select "Run as administrator".


2. Run following command on command prompt
           powercfg -h on




3. Now open "Power Options" from control panel.  Path Control Panel-> Hardware and Sounds -> Power Option.


4. On Power Option panel select "Choose when to turn off the display".



5. On "Edit Plan Settings" panel click "Change Advanced Power Settings", which will launch the advanced power settings panel.


6. Now as shown in above screen shot select your active power plan. Expand "Sleep" menu item, expand "Allow hybrid sleep". Now there will be two options with value as "off". Make then to "On".  Now check your shut down menu list under start menu it should display "Hibernate" under sleep menu. 


Also if you fell you don't want hibernate option. Disabling hibernate is very simple. Just launch command prompt under administrator user as mentioned in step 1. Now execute following command on command prompt. 
          
         powercfg -h off


Check your start menu the hibernate option will not be display here after.





Caching is a technique used to store frequently accessed data in a temporary storage layer to improve system performance and reduce latency....