windows

share a same sql connection among multiple executables

I, I am looking for a way to share a sql connection between two (or more) C/C++ executables. By sql connection sharing, i mean to have a transactional context in common : the A module can start the transaction, the B module do some work, and the C can commit the transaction. Of course, if a module wants it, it can throw an exception a...

How to get the main window handle of a process using JScript?

Is there any method in JScript to get the handle of the main window of a process by providing the process name? The Process.MainWindowHandle property works only in JScript .NET. Is anything similar available in classic JScript? ...

Command line window keeps focus during ant command

I have a command line window open in windows that I run a specific ant command from, this ant command will then call upon SWTBot a simple task but once my Eclipse program opens the command line window is still in the foreground and keeps focus, thus making my SWTBot test fail. Anyone have any idea why this is happening? There are some o...

C++ MFC: How to open immediately a secondary dialog after the first modal dialog was created.

Hi, how can I open a secondary modal dialog in C++ MFC from a dialog without pressing any button? (If I create a dialog in OnInitDialog(), the first dialog won't appear.) ...

How to set focus on file dialog opened in Vbscript

Our Team is automating tests/test data preparation in QTP and we do the scripting in VBScript. In several tests the tester who runs the script need to supply an MS-Excel file with the indata. We use UserAccounts.CommonDialog for this and it works great. Except for one litle problem, when we run this from QTP the file dialog does not get...

PHP mail() function on windows uses From: header as MAIL FROM value

It seems that when I use the code similar to: $name = "Some Name"; $account = "[email protected]"; $headers = "From: " . $name . " <" . $account . ">\n"; mail($sometarget, $somesubject, $somedata, $headers, "-f" . $account); to send e-mails, mail() function on windows is using "From:" header value (here: "Some Name ") instead o...

Redefining keys in Emacs on Windows

Hi, I use my command keys as extra control keys on Mac OS X (and I believe the space cadet keyboards had this configuration). I want to emulate this on my Windows machines by switching Alt to Ctrl and the Windows key to Alt within Emacs. Is this possible? I found this post which suggests something like (setq w32-pass-lwindow-to-system n...

How to serialize a string with double byte characters?

I want to serialize a string (Korean string) containing double byte characters. Do I need to do something special? I am able to serialize char * strings by escaping special characters like \n,\b,\f,\t etc. I am using C++ on Windows without any libraries. ...

Is MonoDevelop remote debugging works on Windows

I'm using mono-2.6.7 and monodevelop-2.4, my OS is Windows 7. I'm trying to implement a remote debugger for my own runtime (based on mono, mono is embedded in it, used lang - C#) in a way it's done by Novell for Moonlight. Unfortunately, no success... After clicking "Debug" in MonoDevelop: IDE is put into debug state, my runtime...

Edit library in hex editor while preserving its integrity

I'm attempting to edit a library in hex editor, insert mode. The main point is to rename a few entries in it. If I make it in "Otherwrite" mode, everything works fine, but every time I try to add a few symbols to the end of string in "Insert" mode, the library fails to load. Anything I'm missing here? ...

Direct Show Capture filter "wrapper"

Hello I need to write a DirectShow capture filter that wraps the "real" video device (fitler) and deinterlaces the captured video. From the interface perspective, this has to be a separate video device available in enumerator and when choosen, it connects to a real video device and inserts a transform filter (deinterlace) between v...

Java on Windows: how to delete a file to trash (using JNA)

I'm not experiences with Windows API at all, so please excuse my ignorance. I want to delete files to the trash. How to do that using JNA and how to detect if this would not be possible, e.g., because the files are located on a network share? ...

How to correct drive names in Gtk.FileChooserDIalog under Windows?

Hello! I write the simple example with gtk.FileChooserDialog. It works fine, but there is one problem under WIndows: I see '\' in first button instead of real drive names, such as 'C:\', 'D:\' and so on. I explored FileChooserDialog structure and tried to change '\' by real drive name, but it works unstable. Can anybody help me? import ...

Copy Files in NSIS

I am using the following command to copy files. After setting output path... File "Documents\*" This action works flawlessly. There are no issues coping the files in the Documents directory until... if there is a copy of an existing file (with a different name) in the directory only the first instance of the file gets copied regardl...

Problem using php ODBC functions from within a Joomla article.

I am new to Joomla and new to php (wish I was so new in age too). I have installed joomla on a local apache webserver. I am trying to use some php code in a joomla article in order to fetch some data from a Sybase ASE 12.5 database. I installed sourcerer and started to try an ODBC connection using a system DSN (which I verified it is wor...

Python: How to use platform.win32_ver() on a remote machine?

So of course I'm new to Python and to programming in general... I am trying to get OS version information from the network. For now I only care about the windows machines. using PyWin32 I can get some basic information, but it's not very reliable. This is an example of what I am doing right now: win32net.NetWkstaGetInfo(myip, 100) Howe...

IWebBrowser2 and multithreaded apartment?

Hi all, I am developing a Windows app with WebBrowser control (IWebBrowser2) embedded. Things look good if I initialize COM apartment as single threaded: CoInitialize(NULL); However, if I change it to be multithreaded: CoInitializeEx(NULL, COINIT_MULTITHREADED); then it starts to fail all over the places with return value of: ...

How to do string comparison condition in DOS?

Wow, never thought I would ever write anything in DOS. Now that I do, I know why I never wanted to. The syntax is absurd! Anyways I need help please. I would like to prompt the user for input, and if a blank line is received, I would like to use the default value, like this: set name=abraham. set /p input=please enter your name, press...

Outlook 2010 Folder Sync Needed for all Replicated Folders

In outlook 2010 you can replicate/sync several folders including other members inboxes, public folders etc. The issue is when outlook is opened only the opened folder is truly sync'ed up to date until you access others. (they sync on first use) I need a method to sync all the folders when Outlook is first launched or otherwise so they ...

Tracking changes in a directory programmacticaly

I have to write a litle app that will process files saved in a given dir. I doesn´t pleases me the idea of writing infinite loops, timers and that kind of stuff. I´d like to know if there if (I would bet a finger that there is!) there is any windows API that would send my app a message for any file saved in that given dir. ...