windows

How to write a simple usb driver?

I make this treat because you are closing my other before i get my answer. Here is my answer clear and exactly what i want to do! I wanna create a usb driver, so my own C application be able to get into my flash drive and take information from the imported flash drive. OS: Windows Please don't close it again I still cant find my answer...

Catching exception in Main() method

Consider the following simple application: a windows form created by a "new C# windows application" sequence in VS that was modified in a following way: public static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Application.Run(new Form1()); } ...

why i can't start orbd service CORBA IIOP?

why i can't start orbd service CORBA IIOP? C:>start orbd -ORBInitialPort 1050 C:>orbd -ORBInitialPort 1050 Failed to start ORBD because of an Internal Exception. Possible Causes: 1. Specified ORBInitialPort or ORBActivationPort is already in use 2. No Write Permission to write orb.db C:> ...

Window 2003 server SP2 detection

Is it possible to automatically detect if Window Server 2003 has SP2 installed? I'm working in InstallShield 9 install script, so I suppose I need to check some registry key? ...

why create CLSID_CaptureGraphBuilder2 instance always failed in a machine

It's a real strange issue, the machine information below is from DXDiag. There is no error reported, but create CLSID_CaptureGraphBuilder2 instance always failed in the machine. It's okay to create CLSID_FilterGraph. Before create CLSID_CaptureGraphBuilder2, I have called CoInitialize and created CLSID_FilterGraph. Only this machine has ...

How do I force cmake to link MSVCR.dll statically in windows XP?

Currently it's linking it dynamically,causing much trouble for me(missing msvcr80.dll). How should I instruct cmake to link it statically? ...

Can I use the Windows logo in my software as an icon?

I am implementing a piece of software that inventories the list of installed Windows programs, and it would be great if I could use a small Windows logo as an icon inside of my software. What are the legalities surrounding the use of the Microsoft Windows logo in 3rd party software? ...

How to determine Threading Model of given COM library?

I have a COM library I should use in my ASP.NET MVC application. However I am unsure about its thread apartment model. How can I determine it? ...

How to deal with Unicode strings in C/C++ in a cross-platform friendly way?

On platforms different than Windows you could easily use char * strings and treat them as UTF-8. The problem is that on Windows you are required to accept and send messages using wchar* strings (W). If you'll use the ANSI functions (A) you will not support Unicode. So if you want to write truly portable application you need to compile ...

Create a Windows (XP) installer on a Linux machine?

I need to create an installer for my software for Windows XP and newer. Is there any mechanism to do that on a Linux machine alone? (I'm running ubuntu, but I'd guess is not a show stopper). ...

Creating a service (SERVICE_ACCEPT_SESSIONCHANGE)

Hi there, I am trying to create a service following the example documented in the link below: http://msdn.microsoft.com/en-us/library/bb540475(v=VS.85).aspx What I am interested in is to be able to catch user "lock" and "unlock" workstation events. Using the code on from the example provided, I modified the following: Line 15: Origi...

How to detect if the Windows DWORD_PTR type is supported, using an ifdef?

There are some new integer types in the Windows API to support Win64. They haven't always been suppoprted; e.g. they aren't present in MSVC6. How can I write an #if condition to detect if these types are supported by <windows.h>? (My code needs to compile under many different versions of Microsoft Visual C++, including MSVC6. So I ne...

Using TaskDialogIndirect in C#

I've been working for a while with the regular Windows Vista/7 TaskDialog for a while, and I wanted to add some additional functionality (like custom buttons and a footer), so I need to use TaskDialogIndirect. Following the MSDN documentation for TaskDialogIndirect, I got this signature: [DllImport("comctl32.dll",CharSet = CharSet.Unic...

Killing a Windows process created with _spawnl

I have some code that uses _spawnl to spawn a process. It works great. However, we've run into a problem where that process hangs and we want to kill it. Given the PID (as in the # that appears in task manager), I can get the handle to the process using OpenProcess. As far as I can tell, this just returns the exactly same value that ...

Can't link Hello World!

Guys that is code copied from a book (Programming Windows 5th edition): #include <windows.h> int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0) ; return 0 ; } Link to the topic in which th...

How to create a test environment for commercial Windows applications?

How do you best test commercial windows .NET applications on different environments? (XP, Vista, Win 7, Terminal server, Citrix) I was thinking of MS Virtual PC, together with some ghosting software like Acronis .. http://www.acronis.com/enterprise/ What are good, tested test setups ? :-) ....................................... Than...

Finding out revision of orphaned checkout in TortoiseSVN

Is there a way in TortoiseSVN - without the regular svn client binaries being installed on the system - to detect an orphaned checkout's revision number? "Orphaned" meaning that the source it was checked out from no longer exists. ...

Editing raw data of a FAT drive

Hi, I am trying to edit the raw data of a FAT drive (I think I found a solution for NTFS, but didn't work for FAT. I don't have anything with FAT, just all my devices are using it) with C# (the result should be a drive in a different format - my own format). I was able to read the raw data (was nice seeing the FAT from inside) from it us...

On Windows 7: Same path but Explorer & Java see different files than Powershell

Submitted for your approval, a story about a poor little java process trapped in the twilight zone... Before I throw up my hands and just say that the NTFS partition is borked is there any rational explanation of what I am seeing. I have a file with a path like this C:\Program Files\Company\product\config\file.xml I am reading this ...

IE 8 issue where window.close() is not occuring after winword.exe is fired to print a document

In my web application, a popup page is called using window.open javascript. There is a Print button on the page that has an onclick event that calls a printchecks() function. The code in the printchecks() function is function printchecks(){ window.print(); window.close(); } Issue is that the window.print brings up the prin...