windows

CAsyncSocket::Close Crashes

Hey, im doing some client/server stuff in a windows service. Pretty much new to this stuff. The problem I'm encountering is that when I try to stop the service through Service Manager, it crashes. I added some MessageBoxes code, to trace where they are crashing and I found that when it closes the listener socket it crashes!!! I tried t...

WMI EnableDHCP fails on disconnected adapter

I'm using the WMI Win32_NetworkAdapterConfiguration Class EnableDHCP Method to enable the DHCP service on a network adapter. I'm using XP Embedded with SP2 but it also happens on my desktop (XP SP3). Everything works great except when the network cable is unplugged. If the cable is disconnected, EnableDHCP returns 94 (Path, file, or o...

Tool to recursively search all files in a directory for a string

Possible Duplicate: Tools to search for strings inside files without indexing Before I make one, any good tools out there for free/cheap that will recurse through all files in a directory and search for a text string in them? Need to find an instance of a string in any configuration files laying around. Kind of like a Windows S...

Vista UAC - Trouble Mapping Network Drives

We have an application that programmatically maps network drives. On Vista with UAC on, we get some strange issues. Our application maps the drive non-elevated, so if the user browses explorer and double clicks to run an exe, it prompts for UAC. So when they approve it, it prompts for a username/password for the share... Strange sin...

How do I find resource leaks in Win32?

After running some hours my application fails in creating a new font object: CreateFontIndirect() returns NULL. I know how to find memory leaks (i.e. using parallel inspector or another profiler - most of them include leak detection). But how can i locate a ressource leak in Win32? ...

What's the best way to do literate programming in Python on Windows?

I've been playing with various ways of doing literate programming in Python. I like noweb, but I have two main problems with it: first, it is hard to build on Windows, where I spend about half my development time; and second, it requires me to indent each chunk of code as it will be in the final program --- which I don't necessarily kno...

Automate Windows From Button

I am looking for a tool that helps me click a button in a windows form(ASP.NET) periodically.Any ideas??? Basically I depeloped a Web Form using ASP.Net (C#). There is a button on this form. I am looking for a tool that clicks on this button every 10 seconds automatically(For testing purposes) ...

.NET - Is there a way to change the GC behavior for the entire machine?

A co-worker said this is possible (but it looks a bit strange to me). If there's a way to do it, where can I do this? I'm talking about winXP OS. ...

__declspec(dllimport/dllexport) and inheritance

Given a DLL with the following classes : #define DLLAPI __declspec(...) class DLLAPI Base { public: virtual void B(); }; class Derived : public Base { public: virtual void B(); virtual void D(); }; Will my "Derived" class be visible outside of the dll even if the "DLLAPI" keyword is not applied to the class defin...

Getting the path & filename of the open document in any Windows application

Goal Let me start with my final vision of what I'd like to be able to do first: In Windows, I'd like to be able to use a global keyboard shortcut that I define (say, Ctrl+Alt+C) to copy the full path and filename of the open document in the foreground application to the clipboard. This would be useful to, for example, be able to subs...

DOS window popping up when using IO.popen, etc.

I'm working on a GUI for Windows XP. Everything works great, except when I run an external command through backticks, %x(), IO.popen, etc, I get a DOS window that pops up for a split second. I know this doesn't happen when I've developed on OS X and Linux. Any ideas on how to get rid of it? (Or at least hide it?) I'm using rubyw 1.8...

Which has better Eclipse support: git or Mercurial

I work in a team of Java-developers who are very familiar with Eclipse. Most of the team uses Windows. We are switching our main project from CVS into something newer. Subversion seems already old and not really that much better than CVS. We are really interested in distributed version control systems, mainly Mercurial and git. Which of ...

FindWindow with partial window title (Windows, C)

Is there any API similar to FindWindow() but that searches the windows by partial title? The reason is that I need to the handle to a window that has a fix part on the title but the other part changes constantly. So for example the window title could be: DataBase read: XYDB or DataBase read: WZDB in the examples the fix part is "Dat...

How to search for a .htaccess file with Windows?

I am dealing with a massive nest of files and need to find a .htaccess file that is redirecting a single page in my website. I know how ridiculous this sounds: why not just check the directories the page is located within? But the problem is slightly more complicated than that. All I need though, is to search for every .htaccess file und...

Writing to user documents folder C++

Hi everyone, I'm trying to write some info to the user's documents folder (eg. C:\Documents and Settings\[userName]), but I can't seem to find out how to grab the path programmatically. Is there any way to do this? C++, not using .NET. Thanks! ...

Redirect Traffic from NIC to Another NIC On Separate Networks While Using Remoting

The project I'm working on is to handle data capture from scan guns (Pocket PC 2003) and process this data on a host (Win XP) then into our inventory database on a separate server (Win 2000). This is all driven by the Remoting framework provided by MS and As Good As It Gets (http://gotcf.net). The application is complete enough for a gen...

What options are there for replacing CDONTS in an ASP application on widows 2003 server

I have a classic ASP application using CDONTS. What options are available to allow the ASP application to continue sending emails with something that is standard on Windows 2003 server with the .Net framework 2.0 installed. ...

Globbing in C++/C, on Windows

Is there a smooth way to glob in C or C++ in Windows? E.g., myprogram.exe *.txt sends my program an ARGV list that has...ARGV[1]=*.txt in it. I would like to be able to have a function (let's call it readglob) that takes a string and returns a vector of strings, each containing a filename. This way, if I have files a.txt b.txt c.txt i...

Is it possible to tune internal windows webdav client? (mini-redirector)

I recently compared Windows Vista internal Webdav client (mini-redirector) to WebDrive, because Vista seemed to be very slow. I found that Windows Vista uses only 1 HTTP connection and needs 9 requests on average to upload one file, while WebDrive uses 2 HTTP connections for uploading by default (can be configured to use more), and need...

need same logic in windows as been done by SED below

sed 's/^#//g' < kam_account_calls.txt > kam_account_calls1.txt This command removes # from the start of the line. Please let me know how to adopt the same functionality in the Windows command shell. ...