windows

Win32: How to crash?

i'm trying to figure out where Windows Error Reports are saved; i hit Send on some earlier today, but i forgot that i want to "view the details" so i can examine the memory minidumps. But i cannot find where they are stored (and google doesn't know). So i want to write a dummy application that will crash, show the WER dialog, let me cl...

How do I build boost examples with bjam?

Boost library is full of examples and tests and I would like to build them using bjam if possible. How do I build boost examples with bjam? PS. I wasn't able to locate proper documentation for this option. ...

How do I output installation status using gtk in c?

int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0; } The above is just a empty winform,I want to output dynamic information in it(not editable), how should I do that? ...

How to execute programs in the same directory as the windows batch file?

I have in the same folder a .bat and a .exe file. I couldn't call the .exe file from the .bat unless I put the full absolute path to it. Is there a way to don't specify the path? ...

How can I write a null ASCII character (nul) to a file with a Windows batch script?

I'm attempting to write an ASCII null character (nul) to a file from a Windows batch script without success. I initially tried using echo like this: echo <Alt+2+5+6> which seems like it should work (typing <Alt+2+5+6> in the command window does write a null character - or ^@ as it appears), but echo then outputs: More? and hangs un...

How to read file from the installation folder of app using c#?

Hi I am reading a file using File.ReadAllText("filename.txt"). This file is located in very same folder where the .exe file is located (c:/program files/installation folder). But windows app looks into System32 folder for this file by default. **I don't want to hard code the path of the file. ...

what to use for repetitive (daily, weekly, monthly) tasks ? Workflows, Windows Services, something else?

I've been writing Windows Services for a while and they always seem to work fine for things that need to run every day, few times a week, once a month, etc. but I've been lately thinking about going with Windows Workflow Foundation. However, I am unsure how would they run on a server without some container application (for instance Shar...

Need help with displaying chars starting from line1 position 1

Hi, I am using an HP RS232 pole display with setting as listed below. Also the documentation is provided in this link: http://www.camax.it/manuali/Manuale%20LD220%20VFD.pdf Char type: USA/Europe (default) Command mode: EPSON (default) Baud rate: 9600, n , 8, 1 (default) Passthru None (Default) Here's the code using...

What is the "Cannot set allocations" error, who emits it and what can I do about it?

We've been plagued for several years by occasional reports from customers about a non-descript error message "Cannot set allocations" that appears on startup of our app. We have never been able to reproduce the problem in our own test environments so far. I have now run out of ideas for attempting to track this down. Here's a collection ...

ODBC - multiple connections from one app to the same data source

I vaguely remember reading somewhere (in MSDN ODBC documentation?) that one application cannot make more than one connection to a single data source. It seemed to me that I need one connection that all the threads of the application will have to share. I was trying to look this information up, but I can't seem to find it anymore. Does an...

Java process is not terminating after starting an external process

On Windows I've started a program "async.cmd" with a ProcessBuilder like this: ProcessBuilder processBuilder = new ProcessBuilder( "async.cmd" ); processBuilder.redirectErrorStream( true ); processBuilder.start(); Then I read the output of the process in a separate thread like this: byte[] buffer = new byte[ 8192 ]; while( !interrupt...

Is It possible to set environment variable and echo it in a single line batch script?

set A=2 && echo %A% This does not echo A as 2 in windows. Is there any way to do it? A=2 ; echo $A works in bash. I want a similar behavior on windows ...

Windows batch file: choosing a file from a directory based on directory name

I don't do windows batch programming, nor do I need to go that far down the rabbit hole. I have directory structures as such: dir1000000/file.txt dir2000000_1/file.txt dir2000000_2/file.txt I need to select the file.txt from the path with the lexicographically greatest value, i.e. dir2000000_2/file.txt. How do I go about doing this? ...

WMIprvse process leaks memory on 2008 server R2

I have a Windows 2008 R2 server running on a VM machine. My .NET service is running on this server periodically querying WMI, for example: SELECT ProcessId FROM Win32_Service WHERE ... After a day or two WMIprvse takes up to 500M memory and WMI queries start getting out of memory exceptions. This article seems to be talking about thi...

Windows redistribution licensing for virtual demos

What are the license restrictions surrounding the redistribution of Windows OSes as part of virtual demos? I am looking to make available demo versions of my software as already installed and configured on a VHD (or whatever the VMWare equivalent is). I was told that this is not possible because MS does not allow the Windows OS to be re...

How to tell if the OS is Windows XP or higher?

I am trying to play with the Environment.OSVersion.Version object and can't really tell what version would indicate that the OS is Windows XP or higher (e.g. I want to exclude Windows 2000, ME or previous versions). ...

In-Proc SxS opens for shell extension in managed code?

The recommendation used to be "Do not write in-process shell extensions in managed code." But with .NET Framework 4 and In-Process Side-by-Side the main reason not to write shell extensions in managed code should be resolved. With that said, I have three questions. Is it now okay to write shell extensions in managed code? Which probl...

How can I get read-ahead bytes?

Operating systems read from disk more than what a program actually requests, because a program is likely to need nearby information in the future. In my application, when I fetch an item from disk, I would like to show an interval of information around the element. There's a trade off between how much information I request and show, an...

Simple Win GUI - should I try PowerShell or just stick with HTA?

knowing what PowerShell can do on a command line I have never learned how to write GUIs with it. Should I? Or just go back to the good old HTA / VBScript? ...

Can I disable window autoplay function programatically with C#/.NET?

Does anybody know a way to deactivate the autoplay function of windows using c#/.NET? ...