windows

SQL / WINDOWS - optimal char lengths - DOES IT MATTER

Three little questions for the clever people of stackoverflow.... WINDOWS: max file name length in windows is 255 - why is this and why not 256? why is the maximum fully qualified filename (full path) stated as 32,767 when in reality it has to be a max of 255/260 to avoid any errors. SQL: when creating chars or varchars fields in ...

Enumerating threads in Windows

How can I enumerate all of the threads in a process given a HANDLE to the process (or a process ID)? I'm interested in doing this so I can further do an EnumThreadWindows on each thread. ...

What is a good wiki with great spam protection that is easily hosted on Windows/IIS7?

I am looking to host a wiki but want it to be very low maintenance. Spam protection will be key. Perhaps I can have a new account approval process and ban users who spam the system. I have looked occasionally over the last year and I have not not been happy with the available options. I would prefer a .NET solution but I understand I ma...

Is there a command line utility to change the embedded Icon of a win32 exe?

...id like something I could integrate into my build process: is there anything "standard" tool that does this? ...

"193: %1 is not a valid Win32 application" bug with a new Rails Application

I have a new rails application which I have created under Windows 7 by going into a directory and typing "rails newapp". The creation went fine, and when I access the root page, all is well. However, when I try to access a page that would access the database, I get this: 193: %1 is not a valid Win32 application. In the developer.log. ...

Invalid Month in Date - Date format in Informix reverts sporadically

So we have an AIX (ugh) server that runs an ERP system. This system's built in reports suck so I am of course tasked with building the reports we need. I've got many reports I run and most of course are for specific dates, etc. The coding is done in C# running in ASP.net on a Windows 2003 Standard Server box. It uses the Informix CSDK t...

How can I get a printers device context?

I'm on Windows and trying to print an Enhanced Metafile (EMF) using PlayEnhMetaFile(). I'm currently displaying it using a device context for a window on the screen, but now I want to send it to a printer. How can I get a device context for the printer and pass it into this function properly? ...

Books on External Data Transfer For Windows

Can anyone help me find a book related to how data transfer works with external peripherals (via USB port, serial port, parallel port, etc). I would be really grateful if its a practically oriented book! ...

IIS: How to disable Data Execution Prevention in Windows Server 2008?

I've been trying to disable DEP on my windows 2008 dev box and have not succeeded. I've tried: System Properties->Performance Options->Data Execution Prevention->Turn on DEP for essential Windows programs and services only (still happens) System Properties->Performance Options->Data Execution Prevention->Turn on DEP for all programs...

Interprocess Communication between C++ app and Java App in Windows OS environment

We have a C++ application on Windows that starts a java process. These two apps need to communicate with each other (via snippets of xml). What interprocess communication method would you choose, and why? Methods on the table for us are: a shared file(s), pipes and sockets (although I think this has some security concerns). I'm open to...

System.ComponentModel.Win32Exception: The operation completed successfully

I am getting this exception sometimes while running my Windows Forms app for a long time: System.ComponentModel.Win32Exception: The operation completed successfully at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at System.Drawing.BufferedGraphi...

Git checkout and reset on Windows occasionally shows random files have changed

Often when I do a checkout of a different branch, or a reset, I will get 'permission denied' errors from windows for one to a dozen files - but the particular files vary from run to run. Here's the output from a test I just did, with GIT_TRACE=1. The trace only added the one line before the error message: $ git checkout master t...

Handling Windows-specific exceptions in platform-independent way

Consider the following Python exception: [...] f.extractall() File "C:\Python26\lib\zipfile.py", line 935, in extractall self.extract(zipinfo, path, pwd) File "C:\Python26\lib\zipfile.py", line 923, in extract return self._extract_member(member, path, pwd) File "C:\Python26\lib\zipfile.py", line 957, in _extract_memb...

Application Autostart Locations/methods for Windows (XP, Vista, 7) and Linux (GTK, KDE, ...)

I am developing a cross platform application that needs to auto start upon user login (not system start). What are the common locations/methods in invoking auto start for Windows/Linux. For example, are the Windows registry locations for auto start compatible across all versions of windows (XP, Vista, Windows 7, etc). And what about ...

prev next pages for winforms

I'd like to implement the prev/next page behaviour for a winforms app like the browser prev/next pages any existing code samples or guidance on where to start ? I'd assume this is something already implemented and would not like to reinvent the wheel if possible If the sample uses scsf/cab, that would be even better ...

Low overhead (statistical) profiler for Win32 platform with managed capabilities

Anyone can recommend a LOP on Windows? Similar to Linux's OProfile or to OS X's Shark. must be able to sample non-instrumented binaries capable of resolving CLR stacks preferable delayed PDB resolution of symbols impact low enough to be able to get a decent reading on live, production systems ...

interposers on Windows

Is it possible to substitute system functions, as is possible on Linux and Solaris using the LD_PRELOAD For example by setting the environment variable: LD_PRELOAD=/path/to/mymalloc.so I would have my replacement malloc functions instead of in the C runtime already installed in the system libraries. All other functions in the system d...

Import 32-bit dsn into 64-bit window server

We are in process of upgrading from 32-bit windows 2003 server to 64-bit windows 2003 server. We have hundreds of ODBC DSN's created on the 32-bit, which we now want to work on the 64-bit box. Using the registry export and importing into the 64-bit box results in those entries ending up on the 32-bit part of the odbc windows registry tre...

Difference between .dll and .exe?

I want to know the exact difference between the dll and exe file. ...

Windows 7 Device Stage

Can anyone please provide some information on Device Stage for Windows 7 from a developers perspective? That is how a developer needs to develop his software for a device in order to expose it through Windows 7 Device Stage? Please pardon me if I am wrong somewhere... I know very little about Device Stage. Thanks, Sourabh ...