windows

How to convert std::string to LPCSTR?

Hi How can I convert a std::string to LPCSTR? Also, how can I convert a std::string to LPWSTR? I am totally confused with these LPCSTR LPSTR LPWSTR LPCWSTR? Are LPWSTR and LPCWSTR are the same? ...

What is the correct way for a program to terminate its own process (Windows)

C# .NET 3.5 I have a console application that is being called by another application on the computer. This console app runs continuously, and listens for data on stdin from the "parent" process. However, when the parent is stopped or killed, the console app that it started continues. Under normal circumstances, it sits and idles wa...

Hiding minimized title-bars when explorer.exe is dead

I'm trying to secure the kiosk my application runs on. As part of that process, I've decided to kill explorer.exe and task manager. If I minimize an application while explorer.exe is dead it will show up as a minimized task-bar sitting on top of the desktop. The problem is that these title-bars sit on top of any foreground windows so the...

Sharing memory between two processes (C, Windows)

Since I haven't found an answer to the question asked previously here I'm trying a different approach. Is there any way to share memory between two processes? The second process gets the information from an injection since it's a legacy program that it's not being supported anymore. My idea is to inject some code there, in the struc...

How to identify the currently available wireless networks with Python in Windows?

Is there a way to get a list of wireless networks (SSID's) that are currently available? And seeing what is the current connected network? Doesn't need to be exactly the SSID, I just need to identify the current wireless network. ...

How to set proxy with python

How can I get the current Windows' browser proxy setting, as well as set them to a value? I knnow I can do this by looking in the registry at Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer, but I'm looking, if it is possible, to do this without directly messing with the registry. ...

Writing my own custom command line "wrapper" for windows

I have never been a fan of the windows command line. I have tried tools like powercmd and liked them, but most are not distributed for free and I don't relish the thought of paying for something that I think I could write myself. I want to write my own command line wrapper similar to powercmd that allows for these properties: Custom fo...

How do I see if another process is running on windows?

I have a VC++ console app and I need to check to see if another process is running. I don't have the window title, all I have is the executable name. How do I get the process handle / PID for it? Can I enumerate the processes running with this .exe ? ...

Taking Adobe Flash Player Off Its Leash on WinXP

I'm working with a flash application that runs as a standalone executable by way of the File -> Create Projector... option on the standalone Adobe Flash Player. I've noticed that it's pretty well-behaved, with a modest memory footprint and reasonable CPU demands, even when it's struggling with something difficult to render or animate fo...

What is the Best Diff Utility for Windows Development?

Possible Duplicate: Best Diff Tool? I am mainly a C# ASP.NET Developer and I use KDiff3 as my diff tool. I have been using it, happily, for several years and was wondering what others were using. ...

C#-WebRequest in a Windows Service

Hi there, I'm currently developing a Windows Service to download some emails in the background. For easy testing, the core of this service can be run in a standalone application, too. There's no problem while downloading the mails (service and standalone) but I'm not able to get a WebRequest when running the service (everything's find i...

OpenVPN --auth-user-pass FILE option on Windows

If you try to pass the username/password to OpenVPN from a file via the --auth-user-pass switch, you get the following error: "Sorry, 'Auth' password cannot be read from a file." At least they're polite. So our workaround was to programmatically write to "standard in" when we get the Auth Username: and Auth Password: prompts (this is...

SCSI Windows Setup on Dell Precision 670 Workstation...please help.

Error Windows Setup: "setup did not find any hard disk drives installed in your computer" This is not exactly a programming question but I thought you guys might be able to help. I just received a Dell Precision 670 workstation. Windows is not recognizing the hard drive and I have experienced this before with other computers. I usually ...

Why won't my mouse cursor move where I tell it to go with Cursor.Position?

I'm doing some manipulation of the mouse cursor regarding clipping areas, and to this end I need to show a "fake" cursor on the screen. My real cursor will eventually be hidden, and just slightly off from the user's fake cursor to give me a buffer to preform clipping operations. But that's not really important. This is so weird. It seem...

is it possible to store output of system call in windows?

for ex: i want to store output of system("dir"); Thanks & Regards, calvin ...

Listing serial (COM) ports on Windows?

Hello, I'm looking for a robust way to list the available serial (COM) ports on a Windows machine. There's this post about using WMI, but I would like something less .NET specific - I want to get the list of ports in a Python or a C++ program, without .NET. I currently know of two other approaches: Reading the information in the HARD...

Are "code-signed" windows applications less vulnerable to virus infections?

If you sign a windows (native, not .NET) application with a code signing certificate, does this somehow prevent it being subsequently infected with a virus? Obviously if you sign an already infected file, you've got a problem... ...

Manipulation of Time in VC++

how to calculate the starting and end time of switch in VC++ can anyone please help me to solve this? ...

How does srv.sys decide on raw vs core mode depending on the underlying filesystem?

Hello, We are developing a file system for Windows using IFS Kit. We started to investigate a performance problem which caused our file system I/O to be much slower when shared over the network. After looking at it with FileMon and TCPView from Sysinternals we found out that if a NTFS/FAT was shared, the SMB client and server were trans...

Dealing with files that Git refuses to reset?

I and my collegues are having terrible trouble getting git to behave properly with certain files on our Windows repostiory clones. The clones have been made by cloning a repository which originates on an OSX machine. We have set autocrlf to true, but the problem is that we reguarly find files that git thinks are changed even though we ...