windows

How does one create a custom event in windows?

This is something I'd expect to be quite straightforward, but after a couple of hours browsing Visual Explorer online help and ploughing through various forums, I'm still at a loss... Basically, I'd like to be able to create a custom Windows event which sends a vector of short integers to its recipient. I'd actually like to create the e...

Correctly getting sha-1 for files using openssl

Hi I am trying to get an sha-1 for a number of files. What I currently do is cycle the files in a given path, open and read each file separately and load the contents in a buffer and then send it to openssl's SHA function to get the hash. The code looks something like this: void ReadHashFile(LPCTSTR name) { FILE * pFile; long lSi...

What's causing this weird Windows Phone Emulator crash?

I am trying to debug my Windows Phone 7 app, and I am getting the following error upon launching the app in the emulator (via VS2010 debug): Unable to start program '\Windows\tashost.exe\' The drive cannot locate a specific area or track. Any ideas as what may be causing this? The most recent change I made was adding functional...

Emulate User Activity

I want to emulate user activity in Windows machine like left mouse click and further more I would like to perform a pre-defined steps repeatability. Is there any tool available for that? Please suggest me an easy and nice way to do it? ...

php contact form on windows hosting error

I am trying to use a php contact form on widows asp.net hosting package, php is enabled but still my form is not sending email it is directing to error.html page...... here is the code <?php $EmailFrom = "anksaltlamps.com"; $EmailTo = "[email protected]"; $Subject = "Website Query"; $Name = "Not Specified"; $Tel= "Not Specified...

Printer Driver Development - from 32 to 64 bits...

Hi all, I've developed a driver that is compiled for 32 bits system. The driver is unidriver based. Does anyone knows what should be needed to get the driver compatible with 64 bits? What changes should I need to do to the code, if any? or is it just a matter of compiling it with a 64 bits version of the DDK? Thanks in advance. Nuno ...

Get free disk space of a Windows mount point remotely

Does anyone know of a way to get the free disk space of a Windows mount point on a remote system without using WMI? For example, GetDiskFreeSpaceEx returns the following values: C:\ - 29 GB C:\MountedDir - 50 GB When run remotely on a Windows 2003 server (orig_server is 2008 R2) it reports the following: \\orig_server\C$ - 29 GB \\o...

Viewing available message strings (from mc.exe) in a 3rd party DLL

Is there a way to view all the messages (ie messages created for FormatMessage by the mc.exe message compiler) available within a DLL? It appears they are added as a single resource as type 11. Unfortunately that resource is binary. ...

Can't query AD (get a DirectoryServicesCOMException)

I'm attempting to query AD in an ASP.Net (4.0) application that is running on Windows Server 2008 R2 (IIS7 installed). (It also fails when running as a 2.0 application as well) This is nothing new for me, as I've done this many times before. I wrote a small ASP.Net program that runs fine on my own machine (Windows XP with IIS6), but fa...

Exception handling

I was trying to write a code to handle exceptions, but overriding another exception handler, is it possible? I was developing an exe in asm to debug a dll, and detect some exceptions that are raised (access violation) but the dll has its own exception handling, so a normal SEH should not work, i would like to know if there is any kind o...

OpenGL: Crashes at random OpenGL function call

I am getting weird problem, the crash happens at random times, for example i managed to use the 3d app for a while without crashing, then most of the times it crashes always when i suddenly render a lot of objects at same time. I have recently noticed that changing the huge texture surface on this ATI card will crash my whole computer ...

Converting a UNICODE_STRING to ANSI or vice versa in C

Hello, I have a UNICODE_STRING that I would like to compare to a null-terminated ANSI string to check if they are the same. I'm using C. I would like to avoid including winternl.h for RtlInitUnicodeString. What is the preferred method doing this? Or, alternatively, is there any problem with me using MultiByteToWideChar() to conve...

How to remove scrollbars in console windows C++

I have been checking out some Rogue like games (Larn, Rogue, etc) that are written in C and C++, and I have noticed that they do not have the scrollbars to the right of the console window. How can I accomplish this same feature? ...

Is there a MAKELONGLONG function?

I need to combine two 32-bit values to create a 64-bit value. I'm looking for something analogous to MAKEWORD and MAKELONG. I can easily define my own macro or function, but if the API already provides one, I'd prefer to use that. ...

Event IDs don't match what is displayed in Event Viewer

In the System event log is an event with the following details: Source: Kernel-General Event ID: 1 Details: The system time has changed to ‎2010‎-‎07‎-‎17T02:58:20.285000000Z from ‎2010‎-‎07‎-‎17T02:58:20.285868600Z. The EVENTLOGRECORD also has a 1 for the EventID field, so it matches what we see in the Event Log viewer. So far so go...

Error Getting Cassini to work on Local Machine

I get the following error when attempted to get cassini to work on a local machine: The current identity (NT AUTHORITY\LOCAL SERVICE) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files I actually created a BAT file to do the following cd\ cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50...

Making TortoiseSVN ready for dummies

I have some guys in my project who will never ever learn SVN, but I want them to use it anyway. So is there an option to make TortoiseSVN just automatically delete all missing files (that were under verison control but deleted) automatically add all new files (that are not yet under version control) I think you can write local client...

Popen gives "File not found" Error (windows/python)

I'm trying to run console commands via subprocess.Popen, and whenever I run it I get the windows "File not found" error, even when running the echo command. I am also using Popen inside a thread made with the thread module. Is that the problem? ...

How to run "ipconfig" and get the output in adobe AIR in windows?

import flash.desktop.NativeProcess; import flash.desktop.NativeProcessStartupInfo; if (NativeProcess.isSupported) { var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo(); var processpath:File = File.applicationDirectory.resolvePath("MyApplication.whatever"); var process:NativeProcess = new NativeProcess(); ...

Windows Service Setting user account

Hi I want to set the user account for Windows Service even before installing. I am doing it by adding code in project installer. this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.User; this.serviceProcessInstaller1.Password = ConfigurationSettings.AppSettings["password"]; this.serviceProcessInstaller1.Userna...