windows

hibernating a single process in Windows

Is there any library or software or any way of saving the state of a single process in Windows to a file, then restoring the running process to a running state with all the memory already loaded at a later time? I am aware that open handles will have to be re-opened, threads may have to started, etc, but can the heap and a single thread...

Windows Forms - Validate DataGridView input

I have a Windows Forms application with a DataGridView in one of the forms. The DataGridView can insert and update through a Typed Data Set generated by Visual Studio. I want to show user friendly error messages when a user doesnt fill in a required field or enters the wrong data type, etc. instead of the ugly huge one that is shown by ...

What is the difference between CreateObject and Wscript.CreateObject ?

Does anyone know the reasoning behind having the option using: Wscript.CreateObject("some.object") and CreateObject("some.object") within VBScript? when I find documentation or examples that use Wscript.CreateObject, I usually rewrite using CreateObject, because it always seems to work, and then I can easily reuse the code within a...

Unique identifier for user profiles in Windows

For a client/server application I need to centrally store parts of the configuration information that usually goes into the users profile directory. The client application would on first use write a file or registry entry with a GUID into the current profile. This GUID would subsequently be used as a key in the configuration database on...

Why is it that Cygwin can run .bat scripts?

When I execute a .bat script from bash in Cygwin, by what mechanism is it running? I understand that if I run a .EXE it will launch, regardless of whether the .EXE is from Cygwin or from a more traditional environment. I understand that when I execute an executable script with #! at the beginning that Cygwin supplies the magic for it t...

IBM Websphere on Windows- OutOfMemoryError: Failed to create a thread

I have a J2EE application running on an IBM Websphere Application Server on a Windows Operating System. Occasionally I see an OutOfMemoryError Exception with the following information in the javacore file. 1TISIGINFO Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError":"Failed to create a thread: retVal -1073741830...

NTFS pending delete question

In my apps (VB6 and C# 2008) on Windows 2003 twice now I have seen similar behavior regarding deletion of folders containing files. My code will build some temp folder and generate files in that folder for subsequent processing. Upon processing completion, my code will try to delete the generated temp folder. The delete operation com...

Best web server for Microsoft Windows to execute cgi

Is Apache configured for windows the best way to go? Does it have any issues running cgi? ...

Why does the sqlite 1.2.3 gem install correctly for MRI but not for JRuby?

If I call: gem install sqlite3-ruby --v 1.2.3 it works for MRI but if I call: jruby -S gem install sqlite3-ruby --v 1.2.3 it says it's trying to build a native extension (for Windows) and fails. Why are JRuby and MRI different in the way they treat gems? ...

Differences between UNIX and Windows development

I've been programming in C and C++ in Linux for around 3 years, and recently have been interested in developing commercial software for businesses. Let's say I've found a niche where I think I could be successful, but that they only use Windows. I have no experience whatsoever with the Windows API, however. I have a few questions: Sh...

Adding Administrators Via Group Policy

My Windows Vista work computer is a member of a domain. The domain administrators have set up a group policy that keeps adding them as Administrators of my computer every night. Is there a way I can prevent this from happening? I am an Administrator on the computer. ...

How do I read only available data off a windows COM port?

I have a file handle to a serial (COM) port. I need to read whatever data is available immediately and not wait for additional data to be sent. How can I determine how much data is available? I can call SetCommMask(myHandle, EV_RXCHAR) and then wait for an event to tell me that some data is available, but that won't tell me how much I ...

Under UAC, why can't I write a file as an impersonated user?

I'm impersonating a user until Windows 2008 with UAC enabled. I'm trying to write some files to a temp directory. But even if a user has write access to a directory, when I impersonate that user, I'm unable to write to that directory (I get an Access Denied error). Apparently, this is due to UAC blocking me. This is related to a post...

Why does my Volume Shadow Copy Service requester fail: cannot find CreateVssBackupComponentsInternal

I have implemented a VSS requester, and it links compiles and executes on Windows Server 2008, but does not execute on Windows Server 2003. Since my requester is inside a DLL, my DLL will not load. Using the Dependency Walker, I discovered that my DLL is finding VSSAPI.DLL just fine, but it reports: Error: At least one required implicit...

Recommended key size and type for GnuPG?

A Practical Introduction to GNU Privacy Guard in Windows recommends DSA and ElGamal, but I would like to know if RSA is good enough to use these days, and if so, what minimum key size should I use? Is it ok to use SHA-256 for signing (for compatibility with e-mail clients)? Also, beside e-ignite: Key Types, can you point to other source...

What is the trick with c:\program?

Hi Guys, I found that taking any exe file, renaming it to program (without extension) and putting it in C:\ root folder might cause strange things in windows like showing this application when other programs start. What is it? is it some kind of backdoor? p.s if you restart windows after doing so - you get a warning about it. thank...

How hard is it to get a Cocoa application to run on Windows?

In the wikipedia article on Cocoa it says: There are also open source implementations of major parts of the Cocoa framework that allows cross-platform (including Microsoft Windows) Cocoa application development, such as GNUstep, Cappuccino, and Cocotron. Yet when I looked into whether Mac application Tweetie was available for windo...

joySetCapture doesn't work with fChanged = false

I am using joySetCapture with fChanged (4'th parameter) = true. I am getting the messages only when position is changed, as I should. However, I am not getting any message when a joystick button is pressed. If I use fChanged = false, the wParam of the periodic messages is updated correctly. How can I get messages only when either posi...

Is there a decent C++ wrapper around Win32's lockless SList out there?

Windows provides a lockless singly linked list, as documented at this page: Win32 SList I'm wondering if there's an existing good C++ wrapper around this functionality. When I say good, I mean it exports the usual STL interface as much as possible, supports iterators, etc. I'd much rather use someone else's implementation than sit down ...

Differences between Java and C# and .NET

Apologies in advance for the possible flame thread, but that's not what I'm going for. I've only ever done serious development in Linux using C and C++, and I'm looking to take the plunge into Windows. I've been doing some reading and asking around, and it seems to me that .NET with C# is the way to go for developing commercial user-or...