windows

Top tips for multithreading (Windows platform)

What are the tips you would offer to somebody who is developing a multithreaded application? The only ones I can think of are: Where it is avoidable, do not have multiple threads writing to the same data structure. Where this cannot be avoided, have critical sections so that the latecoming thread will wait until is complete. Avoid hav...

Custom action handler for plugged in camera on Windows

My application needs to detect that a camera is plugged in and automatically import all photos. I have been googling for quite sometime with no luck. a. How do I list my app in the list of actions for camera devices? I guess this is about setting my app with some registry key. b. Once my app is launched, how do I read from the camera d...

Best display / editing of subcategories (use Tree ASP.NET or VB.NET winform control?)

Hello, I've got a categories table, and sub-category tables 3 levels deep (in the database they're called Categories, SubCategories, SubSubCategories, and SubSubSubCategories). On the presentation side, I am curious what the best way is to manage those. The categories form a tree/hierarchy structure, so a tree control of some kind sou...

software which can stream any flv file

i know this is not programming related, but i have a scenario. Each video streaming site has a flash video plugin and upon doing the view source i can find the link of the flv file it is streaming. Now i wanted to make an application or work on an existing one, where i can copy and paste the url of the flv file and it streams it for me....

How do you get the SID of the current web user in Legacy ASP?

I have an assembly that is exposed to com that provides access to a security library in .net to legacy vb code so we can add in our new security model without completely rewriting all of our legacy applications into .net. A few methods in one of these classes exposed to COM expect an Sid of the current user (we're on a domain if that m...

Windows Mobile 6 intermitent connection problem NOPATHTODESTINATION

On a Windows Mobile 6 device we are trying to open an internet connection. This usually works but sometimes we get a return code of 0x80004005 with a status of CONNMGR_STATUS_NOPATHTODESTINATION. When this happens it will keep happening but if you launch IE on the device, it will connect and then our call to ConnMgrEstablishConnectionS...

How to remove the edit line at the bottom of a DataGridView?

I am using a DataGridView in a UI because of how easy it is to bind to a source like a DataTable. The only problem i have is that it is intended to be read only and therefore i don't need the edit line that always shows up at the bottom of the grid rows. I have looked around and can't see a way to turn it off. Dose anyone know of a way t...

Concept of "Performance Counters" in Linux/Unix

Windows has a Performance Counters infrastructure. The OS provides some common counters, and I can go add my own. What is the corresponding concept in Linux/Unix? ...

Display 32bit bitmap - Palette

Hello I have an image data in a buffer(type - long) from a scanner which is 32 bit. For example, buffer[0]'s corresponding pixel value is 952 which is [184, 3, 0, 0] <-[R,G,B,A]; I want to display/Paint/draw on to the screen; I am confused when i tried to read about displying bitmaps. I looked at win32 functions, CBitmap class, wi...

problems communicating with driver from user mode

I have a driver I've written, and I created a symbolic name to it. The symbolic name is ... L"\\DosDevices\\somename" ... and when I try to access the device object using CreateFile from usermode, I always get error code 3 (Path not found). I tried using CreateFile with the following paths ... L"\\\\.\\somename" L"\\Device\\somenam...

Getting an infinite "undo stack" without committing to the repository?

Like many programmers, I'm prone to periodic fits of "inspiration" wherein I will suddenly See The Light and perform major surgery on my code. Typically, this works out well, but there are times when I discover later that — due to lack of sleep/caffeine or simply an imperfect understanding of the problem — I've done something very fooli...

How can a Vista toolbar ignore or figure out the border padding setting?

I have a toolbar developed under older versions of Windows that is largely cut off under Vista due to the window new border padding. With the default border padding of 4, the everything on the toolbar is shoved four pixels down and to the right, and then everything is cropped four pixels from the bottom and right sides. I don't really ...

Automate any software

Hi. A quick question. Is there any method to control or automate any Windows application, using the command line. I've tried AutoIt. Any other methods? I'm targetting to control WinCE Test Kit (CETK) to perform the test without having to go to the GUI,or click the menu, connect etc, manually. Thanks in advance! ...

How can I connect to MySQL from windows forms?

How can I connect to mysql data base from windows forms? ...

bsod every time a handle to a driver is created

hello, im writing a driver and I have a problem everytime I try to open a handle to my driver using CreateFile, I get bsod (Access Violation) It's important to mention that my driver loads successfuly and I dont get any errors does someone knows how to handle it ? Thanks in advance! ...

Why does my Perl script halt if CGI module is used after reading from stdin on Windows?

I'm trying to implement a progress indicator for file uploads. Part1 and Part2 of the script run properly if executed separately. But if executed together the script halts at: my $cg = new CGI(); The problem only occurs on an Windows server. What could be the reason? #!C:\Perl\bin\perl.exe -w use CGI; $post_data_filename = "C:\\t...

How do I set the http proxy in a subshell launched from a windows service

I am writing a windows service which takes an uploaded file, runs signtool.exe on it to do the signing and timestamping and then serves the signed file back. The code for this works when run as a standalone server using twisted however if I try and run it as a service it fails with the error "Signing succeeded, but an error occurred whi...

Moving files under python

I'm confused with file moving under python. Under windows commandline, if i have directory c:\a and a directory c:\b, i can do move c:\a c:\b which moves a to b result is directory structure c:\b\a If I try this with os.rename or shutil.move: os.rename("c:/a", "c:/b") I get WindowsError: [Error 17] Cannot create a file when that...

Windows not drawing above OpenGL windows

I have an app with an OpenGL window as a child window of the main window. When I display a dialog box above the OpenGL window, it doesn't get drawn. It's like it's not getting WM_PAINT messages. If I can guess the title bar position of the dialog box, I can drag it and it's still responsive. I realise this might be a vague question, b...

What is the best way to load test a web application running on an IIS 6 server?

I am wanting to load test a web based application that we are hosting on an IIS server (Windows 2003, IIS 6, PHP 5.2.0, MySQL 5.0.22). What are the best tools for : a) load testing b) catching bottlenecks c) catching memory leaks anything else I should be looking for? thanks ------------------------------ UPDATE ---------------------...