windows

Command-line XML validator for Windows

I've always found validation against a schema to be an invaluable ward against thinkos and would like to incorporate validation checks as part of a project where I frequently need to hand-write XML files a few hundred lines in length. My text editor has a fairly nice CLI integration feature, so I'm looking for a command-line validator. ...

What are the numbers on the end of lines in a stacktrace

What do the the numbers after the "+" at the end of the lines in a stack trace represent? Function Source ntdll!KiFastSystemCallRet ntdll!ZwRemoveIoCompletion+c kernel32!GetQueuedCompletionStatus+29 w3tp!THREAD_POOL_DATA::ThreadPoolThread+33 w3tp!THREAD_POOL_DATA::ThreadPoolThread+24 w3tp!THREAD_MANAGER::ThreadMan...

Can an app use the clipboard for its own purposes? (read: who owns the clipboard?)

In PowerBuilder's IDE, the code autocomplete feature uses the clipboard to communicate the completed text to the code window. By doing so, it overrides whatever was stored on the clipboard before. So, if you had the winning numbers of the next lottary stored on your clipboard, and you used the autocomplete to turn m_goodfor into m_goodfo...

What is the Best Practice for Combating the Console Closing Issue?

After compiling console programs the console window closes immediately after running. What is the best practice for keeping it open? I've searched google loads, I'm used to codeblocks where you don't have to worry about it, but, I want to mess around with Visual Studio a bit and with VS, my console closes. All over the interwebz there ar...

Terminate a process tree (C for Windows)

This has been asked before but I can't find a definitive answer, in code. I open a process, ProcessA (with PID 1234). This process opens a child process, ProcessAB (PID 5678). After I'm done I terminate ProcessA but I still have the lingering of ProcessAB. How do I terminate the whole process tree? What I mean, how do I make sure that ...

DCB structure help

I have some questions about the DCB structure that’s used in Windows to control serial communication. How should the EofChar and EvtChar fields be used? Is having fParity set to true and fErrorChar set to false the same as fParity set to true and fAbortOnError set to true? ...

AVI files play locally using WMP but not off my website WMP ActiveX

Hi All, I have a web page allowing clients to play uploaded videos. Several AVI files have recently been uploaded that play fine locally using WMP but over the web using WMP ActiveX playback fails and the browser hangs. The AVI codecs are video: MJPG, audio: PCM GSpot says all codecs are install on my Windows Vista OS, but seems the W...

capistrano problem an windows please help

hi all i am having a problem with deploying my application to my server. i have msysgit, github and capistrano installed and working. i have successfully pushed my app to github and can successfully run cap deploy:setup to setup on my server from my local machine. BUT.. when i run cap deploy:cold it asks me for my passphrase to conn...

Laptop Battery Status?

Is there any way to get the status of the Battery (charging/discharging/Current Charge/Capacity/etc...) from a C++ program in a portable manner between Windows & Linux. I'm doing a small program for my own use and require some help with it. Kindly look over the description of the program on my blog: The JB Journals Also, is there any...

C development on Windows

What is a good toolset for doing C cross platform development on Windows? ...

Browser Compilation Error for Flex

Howdy All, I'm having an odd problem that isn't mission critical since I can use the command line with no probs. In my earlier post http://stackoverflow.com/questions/1141133/flex-web-tier-setup, I had problems getting the web compiler to work. Now that it's working I use this in a browser to compile: http://localhost/flex/topsight...

Not able to connect using Stunnel on reconnect

When I setup stunnel as a client on a machine to forward to another system on SSL port. I am able to connect once using that but when I disconnect from that server and then try to connect again it doesn't connect and shows the following in the logs: 2009.07.24 10:00:58 LOG5[4164:800]: my_server connected remote server from 192.168....

How to wait/block until a semaphore value reaches 0 in windows

Using the semop() function on unix, it's possible to provide a sembuf struct with sem_op =0. Essentially this means that the calling process will wait/block until the semaphore's value becomes zero. Is there an equivalent way to achieve this in windows? The specific use case I'm trying to implement is to wait until the number of reade...

Protecting an ASX file in PHP

I have a members only area on my site where users can login and view Windows Media streaming content. I have created a PHP script to serve the ASX file however I cannot validate this with session information. I think this is because the WMP is making the request and not a php page. Can anyone suggest an elegant way to protect ASX file...

Windows mobile controlling scroll bar with finger

Hi There, I have a question about the windows mobile development. I created a mobile form on the windows mobile 6.0 test project. But that example form slightly larger than the vertically normal pocketpc forms. I now everybody said you can press the scrollbar for accessing bottom or any location of the form. But i need to use the fin...

IO completion port key confusion

I'm writing an IO completion port based server (source code here) using the Windows DLL API in Python using the ctypes module. But this is a pretty direct usage of the API and this question is directed at those who have a knowledge of IOCP, not Python. As I understand the documentation for CreateIoCompletionPort, you specify your "user...

capistrano problem

Hi all I am having a problem with deploying my application to my server. I have msysgit, github and capistrano installed and working. I have successfully pushed my app to github and can successfully run cap deploy:setup to setup on my server from my local machine. BUT.. When I run cap deploy:cold it asks me for my passphrase t...

Get current Windows user name within Silverlight

Is it possible to get the currently logged in user's username with Silverlight? You can assume that user has Windows OS and the Silverlight application is hosted in Internet Explorer. Getting the identity from server side with ASP.NET is not an option, this SL application will be hosted on a static HTML file. ...

Help finding SNMP ODI's for Windows

I am setting up some monitoring on some Windows infrastructure and am having problem locating the ODI's that I am after. Effectively what I need are the ODI's for the following 1) % of CPU utilisation (either used or free). 2) Disk Free 3) % of Free Memory (or bytes) I am doing my testing on XP but will be deploying to 2003/2008. ...

Do I need to write my own host side USB driver for a CDC device

This may not be considered to be directly programming related but I am at a loss to know where else to ask. I have tried looking at a variety of websites but so far Google has not been my friend. I am having trouble finding out whether I need to write my own device driver for the various windows/linux/mac platforms that the device I am...