windows

char* value gets corrupted during assignment

I have the following code , which gets a return value from a function as char* cDestDrive = ReadFromRegistry(HKEY_CURRENT_USER,NDSPATH,szDestPathRoot); I am able to read the value inside cDestDrive till the time I am assigning it. The moment I am assigning it: CString strServerAddress = cDestDrive; the value of cDestDrive gets ch...

How to make a trialware?

Possible Duplicate: how can i make my product as a trial version for 30 days ? Dear all, Recently I have developed a software for windows and I want to make a trial version out of it for advertisement. The trial version I have in mind should be runnable only for 30 days for example. I myself have an idea about saving the time...

Running Java program from commandline

I am trying to run a java program from command line. I tried following the steps mentioned here. But when I try to run javac Hello.java, it's throwing error that such a program is not there. I tried giving java Hello.java and got the error: Exception in thread "main" java.lang.NoClassDefFoundError: Hello/java Caused by: java.lang.ClassN...

Hudson: HTTP listener already in use error

I'm trying to setup Hudson on a Windows server. When I attempt to run Hudson with the command java -jar hudson.war, then I receive an error that the address is already in use for the HTTP listener. I've confirmed that port 8080 (the default Hudson HTTP port) is not being used. I have also tried starting Hudson on another port (java -j...

DialogBlocks on Windows: MSVCR80D.dll is missing

I build wxWidgets application with DialogBlocks on Windows 7 with VS2005 installed. Build is successful, but executable doesn't run giving the message: "The program can't start because MSVCR80D.dll is missing from your computer". The same code built in Visual Studio is OK. Build log: ----------------------- Configuration: VC++ Debug --...

Scanning Local Windows System for Attached USB Devices Using C++

What is the best way to scan the local Windows system for attached USB devices using C++? I need to get a list of Vendor and Product IDs to match against the my device's IDs. If there is a way to scan for a specific VID/PID combination, that would be even better. My end goal is to retrieve the virtual COM port Windows has assigned to ...

Get allocated memory regions of running process.

Hello, Can anyone tell me how to get using WinAPI functions memory allocated memory regions of some process? I want know for each region, start address, size and some other things like, protect type etc. I can't find any WinAPI function to do it ;-( Can anyone help me? ...

When using SQLite what do I have to have in end users machines?

This program will run 100% independently from anyone. Just the guy and his computer. The SQLite database is just a little .db file right? I've also downloaded a driver for accessing the SQLite database using Entity Framework. What would I need to deploy on a users machine? Just the folder with the .exe and the .db file? Thanks. ...

Programmatically detect if Windows Media Player is installed

Anybody have any advice on how to programmatically detect if Windows Media Player is installed? I know about the registry setting look up, but don't trust it since it's more than a little misleading (uninstalled may not remove it). And I've considered just launching a video, but an error could be caused by something other than Media Pl...

Rails plugin failing with an empty folder

Hi, I'm trying to install Abingo for my Rails application which seems can only be installed as a plugin, but it consistently fails silently with just an empty folder created. I've installed plugins in the past (although not on this app, with another in my InstantRails folder), but for some reason today nothing is installing at all, and ...

How to make my program search specific folders for dependencies?

When my program opens, before any of my code actually runs, it will automatically attempt to load various DLLs whose functions it imports. It looks in the folder that the app is in, and then in a few specific places like \Windows and \Windows\System32. If I want to use some custom DLLs, but I don't want to clutter up the app's folder w...

Windows Forms program runs smoth on win7 but on previous os's give the "Index was outside the bounds of the array" Error?

I have a Windows Forms program that runs smooth on win7 but on previous version of windows give the "Index was outside the bounds of the array" error in the imageList call when setting the key-image of the component. Why this can be hapening? PS: This only occur when running the .exe, not when debugging. ...

Projectile curve using GDI

I've calculated the range of projection with given angle, height and velocity. How can you draw a projection curve of that using GDI? ...

Animated Themes for Windows XP

How do I create an animated theme for windows XP? I know how to create normal themes, but can't seem to find anythoing on adding animation. This is what I need: The Start menu should be themed like an iPhone, so I slide to lock/unlock the start menu. Any ideas? ...

.NET Runtime Error in Event Log, P fields

A service we have is occasionally crashing on a test PC. We are getting some information in the Event Log, a ".NET Runtime 2.0 Error" with some details. I've determined that P1 is the executable, P2 is the version, P5 is the .NET Runtime, but what are the rest of the fields (P1-P10)? ...

Why does only the first line of this Windows batch file execute but all three lines execute in a DOS command shell?

I have a batch file that executes three Maven commands, one after the other. Each command can be successfully executed in the script - by itself!. But when I add all three commands to the same file, only the first one executes before the script exits. Any idea why? mvn install:install-file -DgroupId=gdata -DartifactId=base -Dversion=1.0...

Error when trying to access web browser from windows application

I am trying to access open IE instance from my desktop application. Code is IHTMLDocument2 *pDoc; LRESULT lr; HRESULT hr; if ( SendMessageTimeout( hwndChild, uMsg, 0L, 0L, SMTO_ABORTIFHUNG, 1000, (DWORD_PTR *) &lr ) ) { hr = ObjectFromLresult( lr, IID_IHTMLDocument2, 0, (void**)&pDoc ); if ( SUCCEEDED( hr ) ) { IWebBrowser2 *...

git-p4 cloned repo contains mixed filename case -- how to fix?

I imported a large repo using git-p4, and discovered that I have some strangely mixed-case filenames, e.g.: dirA/DIRb/file1.txt and then other files like so: DIRa/dirB/FILE2.txt and so on. These get entered into the repo this way because git-p4 uses fast-import. This causes Git to mysteriously claim that there are untracked directo...

kernel mode timer

How can I have a timer in kernel mode such that a specified function in my driver is called approximately every second on Windows XP and above? I should be able to use all functions (in particular ZwQuerySystemInformation) in the function. I do not need a high resolution timer or millisecond accuracy or anything like that, I just need a ...

How do I kill an unattended scheduled task? (Windows)

I have a runaway windows task, if I were running it as a logged in user I would use Process Explorer (procexpe.exe) and look for the related cmd.exe and kill it there, but this one is running with a user who is not logged in. I can't figure out how to kill it. Any Windows Wizards out there know how to do this? ...