windows

Buffer management for socket application best practice

Having a Windows IOCP app............ I understand that for async i/o operation (on network) the buffer must remain valid for the duration of the send/read operation. So for each connection I have one buffer for the reading. For sending I use buffers to which I copy the data to be sent. When the sending operation completes I release th...

add text before the last line in a text file

hi, I need to add text before the last line in a text file in windows using command. Can any one please suggest a method? Thanks in advance. ...

Way Cross Compile C/C++ code to run on Windows, Linux, and Mac OS?

Is there a way to take my C++ code and cross compile it to run on Windows, Mac OS, and Linux? Is there a tool to do this, or does it have to be manually compiled on each OS via Terminal/Cygwin? ...

Windows 7 recreate my .exes

hi, i have a few programs that check if file exist, and if its old version delete him and paste the new one. However under Windows 7 Professional i can't delete the file some System process is always restoring it (same with the dll files) and as you can imagine a lot of programs are crashing because of that behaviour. So WHAT SERVICE/PRO...

Is appending to a file atomic with Windows/NTFS?

If I'm writing a simple text log file from multiple processes, can they overwrite/corrupt each other's entries? (Basically, this question http://stackoverflow.com/questions/1154446/is-file-append-atomic-in-unix but for Windows/NTFS.) ...

Win32: No Window Appears

I was programming the example code from Frank Luna's book "Introduction to 3D Game Programming with DirectX 10". The code is the first Win32 example in the Appendix A: Windows Programming section. Right now, the program compiles under both VC++ 2008/2010, but no window appears, although the debug session has started and I have to forcef...

How to Use Shaders with OSMesa?

Hello Everyone, I am building a dll, which cannot have any dependencies, so I have to compile all the Mesa source code along with it. Now I got the basic opengl drawing working, but I cannot get shaders to work with OSMesa(Offscreen rendering). All the shader examples that come with the sample projects in Mesa have GLEW.h included. But O...

Creating UTF-8 files in Java from a runnable Jar

I have a little Java project where I've set the properties of the class files to UTF-8 (I use a lot of foreign characters not found on the default CP1252). The goal is to create a text file (in Windows) containing a list of items. When running the class files from Eclipse itself (hitting Ctrl+F11) it creates the file flawlessly and open...

"The application has failed to start because cxcore210.dll was not found". Why would this happen?

I'm having trouble running basic opencv scripts on my new machine. I've installed opencv2.1. I am linking these files from the linker: C:\OpenCV2.1\lib\cv210.lib C:\OpenCV2.1\lib\cvaux210.lib C:\OpenCV2.1\lib\cxcore210.lib C:\OpenCV2.1\lib\highgui210.lib I run the program, it compiles. However, it gives me the error stated...

Batch file recursively find files and rar them

Hi there, I have a Parent Directory which hosts many sub directories, and in every sub directory there is .mpg movies. Some of the directories might contain one or more .mpg movies. I would like to automate the process below, which I have been doing manually. Step One If the directory has more than 1 .mpg file, I create separates dir...

Port a Rails App from Windows to Mac or Linux

Hello I've been a Rails developer on Windows for quite some time now, but I recently completed my biggest project yet (it's quite extensive, took me over a year to build) but I am having trouble deploying it. The combination of it's size, complexity and a windows environment is making it needlessly complex to deploy. I am thinking about...

command line tool text output

I have a small command line tool and after running it, I'd like to display the text output in a way that's easy for someone to copy/paste and save it or email it to someone else. Copy/pasting from a command prompt is not done in the standard way, so I don't want people to have to copy/paste from there. Saving the file to disk is possib...

Create popup "toaster" notifications in Windows with .NET

I am using .NET and am creating a desktop app/service that will display notifications in the corner of my Desktop when certain events are triggered. I don't want to use a regular Message Box b/c that would be too intrusive. I want notifications to slide into view and then fade out after a few seconds. I am thinking of something that will...

Apache Virtual Host in Windows - how do I deal with Symbolic links?

Hi Folks, I'm trying to run a virtual host on a WAPP stack. My virtual host has the FollowSymLinks option, but in Windows, all those symbolic links (I'm using shortcuts, and I think this may be the problem) have the .lnk extension. So if I'm trying to access settings.html, Apache can't find it because all i have sitting there is setti...

Does Ruby 1.9 load extensions from .dll files on Windows?

I have made a C Ruby extension on windows using microsoft visual c++ 2008 express, and put the .dll I compiled into the diectory ruby loads extensions from and required it, and it said the file couldn't be found. I read somewhere that ruby 1.9 doesn't load extensions from dlls; only so's. Is this true, or did I forget to do something? ...

List of Windows Native Functions for XP, VISTA and Windows 7

Hi, On the MSDN is there some sort of reference which details every native function inside the Windows API for different versions say from Windows XP upwards? I have been googling and looking round the MSDN but I must not be looking for the correct thing. Any help would be appreciated. Cheers, Andrew ...

StreamWriter appends random data

Hi I'm seeing odd behaviour using the StreamWriter class writing extra data to a file using this code: public void WriteToCSV(string filename) { StreamWriter streamWriter = null; try { streamWriter = new StreamWriter(filename); Log.Info("Writing CSV report header information ... "); streamWriter.Writ...

Restarting IIS6 - Python

Hi folks, I'm serving a Django app behind IIS 6. I'm wondering if I can restart IIS 6 within Python/Django and what one of the best ways to do would be. Help would be great! ...

Can I set an environment variable for an application using a shortcut in Windows?

I have a feeling I should be able add a directory to the PATH environment variable on an application-lifetime basis, but I can't find out how to do this. Is it possible to add a parameter to a Windows shortcut that appends a directory to the current value of PATH for use by the application being linked? Cheers. ...

Open internet explorer window in C?

Hello, In c/c++ in windows, how do i open a website using the default browser.. in mac os x, i do system("open http://url"); ...