giugno, 2005Archive for

How to Soft Reset Windows Mobile without using KernelIOControl API

I've just writted this snippet of code! :-) Please compile with Microsoft Embedded Visual C++ 4.0 SP4 and run! // // TheResetter.cpp : Softreset your Windows Mobile PDA without KernelIOControl // #include "stdafx.h" #include "tlhelp32.h" #include "Winuser.h" // // The soft reset routine without using KernelIOControl // void SoftResetPDA () { HANDLE hProcessSnap = NULL; PROCESSENTRY32 pe32 = {0}; // Get running processes hProcessSnap = CreateToolhelp32Snapshot(TH32...

Disabling DNS Caching for Negative Answers

Windows XP stores a cache for all DNS answers, either negative or positive. Positive caching is somewhat useful but i think that negative caching is evil, it really makes no sense for me. Developing web applications using multiple networks and multiple local DNS server sometimes can happen that your box receive a negative DNS answer and you aren't able to get the correct local resolution. You can clear the cache with "ipconfig /flushdns" but sometimes this not works so a DNS Client Service reb...

Addressing issues with Windows XP Sp2 and Pocket PC Emulator or Virtual PC on a AMD x86-64 box

After upgrading to SP2 and enabling protection features offered by NX extensions your copy of Virtual PC will not work anymore due to incompatibilities with the PAE mechanism and the NX extensions. Developing smart devices applications with Visual Studio .NET using the emulator (that use Virtual PC) will be denied and so you must disable these extension to get it working again. Open the C:\boot.ini with a text editor and change all lines like this multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="M...

SQL Server 2000 and IIS 6.0: Granting login permission

While debugging .NET Web Applications interfaced to SQL Server 2000 SP4 there are some things to check due to structural changes to IIS 6.0 in Windows Server 2003. IIS 6.0 server user has changed to [NT AUTHORITY\NETWORK SERVICE] (on the Italian version is [NT AUTHORITY\SERVIZIO DI RETE]) and when accessing SQL Server, this one stop us telling that the user cannot login (obvious :-)). Open the Enterprise manager, go to Query Analyzer and execute the following Stored Procedure: exec sp_grantlo...

SQL Script execution on SQL Server 2000 SP4

Just a reminder :-) osql -S Servername -E -iScriptName.sql