windows

Detail about Win32_OperatingSystem SerialNumber

I'm searching for some information regarding Win32_OperatingSystem SerialNumber (MSDN link). Will this number be different when I reinstall Windows with the same key on the same machine? I intend to use it to identify an installation (Windows + PC combination). ...

Not able to write on pipe Windows visual cpp

Hi, I created two pipe to redirect child process stdin and stdout to parent process as given in http://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx The child process is an exe file. when executed using console it first returns a warning on STDOUT and then asks for a yes/no input from STDIN. when i am running the child proce...

How to translate RPC_STATUS into HRESULT?

In my COM component I need to translate all errors into the most suitable HRESULT values possible. Currently if I call some RPC interface method (I call a MIDL-generated stub that in turn calls NdrClientCall2()) and the call fails I return E_FAIL which is not very convenient. There's so-called facility in HRESULT. Can I use this? I tri...

How to copy compressed streams within and AVI file with VfW

Hi, I'm using VfW for opening an AVI file with multiple (2) internal streams. One of the streams is a compressed video stream. I want to copy a short segment of the stream as-is without re-compressing. I managed to use CreateEditableStream() and EditStreamPaste() to extract and copy the relevant part of the stream, but when I use AVI...

Strange consequences of "ref" keyword in C# to COM interop

Consider an excerpt from code that can be found here: namespace WinSearchFile { public class Parser { [DllImport("query.dll", CharSet = CharSet.Unicode)] private extern static int LoadIFilter (string pwcsPath, ref IUnknown pUnkOuter, ref IFilter ppIUnk); [ComImport, Guid("00000000-0000-0000-C000-000000...

copy variable data to new file using batch

hi THis is my code for /l %%i in (1, 1, %N%) do ( echo !v%%i! for /f "tokens=* delims=" %%l in ("!v%%i!") do ( echo %%l >> Linux.cpp ) ) Here i want to copy data in %%l to linux.cpp file Now what happening is if %%l contain abc.cpp this name is stored in linux.cpp. Here i want to store contents in abc.cpp to linux.cpp. Plea...

Windows system time with millisecond precision

Related to my previous question, but with C#, I need the precise system time including milliseconds. C# time function has accuracy up to 10 to 15 milliseconds, but not exactly 1 millisecond. The same is the case with Queue performance counter. Is there any other way to get accuracy up to exact millisecond? ...

how to check if a Windows user can install application? or Is a windows computer member of a domain?

Hi, I am re-implementing auto-update mechanism in an application for internal use in our company. The old system used .exe based installers, which I had to replace with .msi based installer which can work in a Windows Domain. This I have done and works well. Most of users in our headquarter are members of windows domain, but there ar...

SSH Dynamic Port Forwarding ('ssh -D') in Python

I'm looking for a way to implement SSH Dynamic Port Forwarding ('ssh -D') under Python. The problem is that it has to work under Windows, i.e., running SSH with popen/pexec/etc. won't work. Any ideas? cheers, Bruno Nery. ...

How to setup timer resolution to 0.5 ms?

I want to set a machine timer resolution to 0.5ms. Sysinternal utility reports that the min clock resolution is 0.5ms so it can be done. P.S. I know how to set it to 1ms. P.P.S. I changed it from C# to more general question (thanks to Hans) System timer resolution ...

How can we create a partial read-only textbox in windows forms c#?

Hi Friends, I want to get details of the names where their surname is fixed(readonly) in the textbox and original name should be typed from the user end....Is there anyway to make it in windows forms...Please help me I would be really thankful. ...

Find Date Recycle Bin Was Last Emptied

Where on my computer would I be able to find the last date that the recycle bin was last emptied, would such an event be stored in the windows system logs? and if so where? Thanks :) ...

InternetDial with INTERNET_AUTODIAL_FORCE_UNATTENDED still shows an error dialog?

I have a piece of software running on a remote device which calls InternetDial to establish a connection and report information. Most of the time this works fine, but occasionally, some sort of error will occurr (bad signal etc.) and despite calling the function with INTERNET_AUTODIAL_FORCE_UNATTENDED, windows still appears to pop up di...

Convert some code from C++ to C

Possible Duplicate: C code compiles as C++, but not as C Edit: I recompiled the source for the library as C, and that fixed it. I've got this code I need to use in my application. It's for writing to the serial port, and I can't figure out how to get it to run in C. I've got a version in C++, as well as a version that looks ...

CPU spiking in Win2003 server with High NDM activity

We have a Win2003 server, where we receive files through NDM and at any time, we would be receiving 6 files from different sources. The CPU on this server is always > 95%, which causes all the componenets to slow down and the server is hung once in every 2 days. We have the latest McAfee running on the server. Any suggestions. ...

Sharing presentation logic between C# application with windows and web UIs

I need to build an application in C# that will have multiple UIs, 2 for web and one that will be the same application, but able to be used with no internet access. I am leaning towards MVC for web, then MVVM/WPF for the windows application (Silverlight is not an option). I should be able to inject a different repository implementation ...

Sending and receiving Windows messages

Windows messages seems a good way to notify an application on Windows OSes. It actually works well, but few question comes up to my mind: How to specify structured data to the lparam of the SendMessage routines (like many message codes does)? I mean... of course the parameter is a pointer, but how the process access to it? Maybe is it a...

Objective-c mingw in windows

What tutorials cover how to use Objective-C in Windows? I heard about mingw, but I couldn't configure it. I would like to only create command-line programs because I heard that there is no iPhone/iPad simulator for Windows and I would like to learn Objective-C. ...

SSL implementation for selected asp pages in Windows server 2008

I have a asp based website on windows server 2008. I would like to make some selected pages as SSL (https). I tried to enable https. But when i try to access using http it gives error. how to enable https only for selected pages on a website? Thanks -Vivek ...

Inserting characters before whatever is on a line, for many lines

I have been looking at regular expressions to try and do this, but the most I can do is find the start of a line with ^, but not replace it. I can then find the first characters on a line to replace, but can not do it in such a way with keeping it intact. Unfortunately I don´t have access to a tool like cut since I am on a windows mach...