windows

Can I/O completion port help with database instead of File writes?

I am reading up on IOCP, and from what I understand so far, the asynchronous writes only apply in the context of writing to Files. By "Files", I don't mean just disk file, but "File" type output devices on Windows. I am planning to somehow use IOCP in implementing a server that takes messages from clients and then writes those messages ...

WCF Problem with Windows server 2008

i have a weird problem, i have a wcf hosted in a Console Application now i tried it on 3 pcs all running windows 7 it worked fine, but when i take it to the server (windows server 2008) it doesnt work , now i checked firewall and everythings ,i cant seem to get it to work no matter how hard i tried , im not sure if this is has anything t...

Receiving an entire UDP packet

I am programming a UDP proxy application for Windows in C++ that sends and receives UDP packets with Winsock. The problem is that I need to work with the ENTIRE packet, not just the data and UDP and/or IP header. I have tried raw sockets with IP_HDRINCL (might be misspelled), but it still chops off some information from the packet. Is th...

i'm writing a wrapper for cmd but am having trouble with redirecting standard input

OK so here is what I'm doing -- I want to write a .net app that redirects standard out / in to a richtextbox. I've got it working pretty well, but once I add standard input into the mix my read commands freeze up. Here is the relevant code from within my form. Shell = new Process(); Shell.StartInfo.FileName = "cmd"; ...

Is there any way to sniff named pipe traffic in Windows?

Hi guys, Is there any tool that can monitor/capture/sniff named pipe traffic? Even when max instance = 1? ...

CryptGenRandom Entropy

Hello, CryptGenRandom is a random number generator function in CryptoAPI in Windows. How much entropy has that random number generator ? I have already looked a lot, but I couldn't find it. Thanks in advance. ...

How to send shortcut to another application in c++ in MS Windows?

My question is how to send shortcut from c++ to another application. Let's say for example that the notepad is open, and I want send to them shortcut like CTRL+P, or more complexive shortcut like CTRL+SHIFT+HOME, or ALT+F4, I find many good tutorials that explained how to send one key like 'A' or 'ALT', but I did not find how to send it ...

Windows 7 permissions cruise control

Hi! I have cruise control with Nant running on windows 7 machine .Builds work just fine. But I have a task for which i need to start a batch process which opens up an application window (directX based application) and perform some tasks. But this nant task fails all the time , the very first call for device getdevicecaps fails .this t...

How to Recognize that an Application Intends to Execute \ Run a File ?!

I need to recognize and fire an event when a file is going to be executed or run by an application. I know I can do it by hooking windows procedures, but I don't know what procedure or event of windows fires. For example, when an autorun file going to execute, my application should recognize it, Like an antivirus application. I'm not su...

intercept shutdown in windows using vbscript

Hello guys, I want to write a vbscript that will wait for windows shutdown and intercept to carry out proper action before shutting down. I want this to be in vbscript since am using it for administration. ...

Connecting to MS SQL Server from a cross-platform application

I am working on a GUI application that will be used to perform "manual assessment" of large datasets produced by an AI algorithm. The nature of the assessment isn't important to this question; only the fact that the program will need to periodically check for new data from a server, download it, and then upload the results that the user ...

Implement Drag and Drop without using Context Menu using Shell extension in C++

HI, I want to implement Drag and Drop without using Context Menu using Shell extension in C++ Currently I am refering to Shell extension article: http://www.codeproject.com/KB/shell/shellextguide6.aspx But this article in turn is using Cookies and all .. I am not able to understand that. My requirement is just when I want to drag and d...

Does a thread waiting on Windows Events need to get scheduled on CPU to wake up from sleeping?

It is best to describe my question in an example: We create a Windows Event handle by CreateEvent, with manualReset as FALSE. We create 4 threads. Ensure that they all start running and waiting on the above event by WaitForSingleObject. In the main thread, in a for loop, we signal this event 4 times, by SetEvent. such as: for (int i =...

Can't Execute Stored Procedure::procedureName A severe error occurred on the current command. The results, if any, should be discarded.

I am getting the following error Can't Execute Stored Procedure::procedureName A severe error occurred on the current command. The results, if any, should be discarded. when i am executing a stored procedure,which contains only select statements. How can i solve it? Thanks ShaBeg ...

Python on windows, shutting down and taking a screenshot

Hello, I have the following two quesions: 1 I want to be able to shutdown windows xp from python code. I am able to do that by running the following code in the python console: import os os.system("shutdown -s -f") But, if i put the same code in a .py file and try to execute it,it does not work. I get the help prompt for the shutdo...

How can virtual address space mapping be acceptable from a performance point of view?

This question is aimed at any OS using a VAS model, but I'm going to specify windows nt, since that's the system I know best. As we all know, by default, processes on 32 bit windows get 2 GB of memory all by itself. This memory can be located in system memory, a swap file, an usb drive etc. This means that several processes can have al...

Single-EXE, PHP-capable www server?

To run a simple PHP app on users' desktop, I need a light, installer-free, portable www server for Windows that I can just stick into a ZIP file with the minimum files needed to run PHP (php-cgi.exe, php.ini, php5ts.dll, php_pdo_sqlite.dll), so the user only has to unzip the files into a directory, double-click the www EXE, and have a wo...

How to customize the windows shell to display files from a remote source and allow custom drawing?

Is it possible, (via some shell extension or similar) to customize the Windows shell (explorer.exe) to accomplish the following? Make it, upon navigating to a predefined path: draw over its surface - custom background, or even add custom forms for data input display custom listview items based on the "virtual" path provided (something...

Global keyboard hook with C++

I've already saw many tutorials and articles about hooking, yet I don't quite understand it. Mainly because every single example uses different solution. I know I will have to implement something that will keep the hook alive. Usually it's some kind of while cycle. Q1: If this loop was in some class with callbacks, will it prevent the t...

What is a good place to store data files on Win7 that can be accessed and manipulated by multiple user accounts?

So I've been working on a system that includes multiple parts, such as a standard user-mode application, a plug-in for Internet Explorer, and a Windows Service. I need to be able to access and/or manipulate the same set of data files from all of these parts which may run under different user accounts. And I seem to be a little confused a...