windows

How to create an empty file at the command line?

How to create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt but it always displays that a file was copied. Is there any other method in the standard cmd? It should be a method that does not require the touch command from Cygwin or any other nonstandard commands. The command needs to run from a script s...

get file icon for Outlook appointment (.msg)

I've read http://stackoverflow.com/questions/462270/get-file-icon-used-by-shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" for mail and appointment items (if you drag an email and drag an event onto your desktop, the resu...

DllGetVersion not giving expected results under Windows 7

Hi, I have some code that attempts to test whether my application is running with the themes set. Here's the C# code: internal class NativeMethods { [DllImport("comctl32", CharSet = CharSet.Auto, SetLastError = true)] internal static extern uint DllGetVersion(ref DLLVERSIONINFO pdvi); [StructLayout(LayoutKind.Sequential)] ...

How can I create a process in a portable manner?

Hi, I'm trying to write a program which needs to create some other processes. I'm used to the Windows API but now I need my program to be able to run in a Linux platform too. Is it possible to do it in a portable manner? Do I have to use the preprocessor for that purpose? EDIT: I need to wait for it to finish before continuing to do th...

How to refresh data driven combo box on a winform

I have a winform with a combo box thats filled from a query in the database. If I add a field to the database, the new field won't show up in the form until I close it and reopen it. I was able to put in a MessageBox.Show() and once that popped up, I closed it, and saw the new data in the combo box. EDIT: Let me clarify a bit. I hav...

vfprintf causes run-time error

Hello, Visual Studio 2008 I am using the following source code that compiles ok using linux gcc 4.4.1. However, I am trying to compile on windows xp sp3 using VS 2008 compiling as c code. I get a run-time error on the call to vfprintf. And also the __func__ gives me a compile error. "Undeclared identifier". I thought __func__ was de...

any tools to analyze wmv file format?

Hello everyone, I am developing some application (similar to media player but performing more domain specific things) based on wmv file. I am wondering any existing free tools to analyze wmv format -- I am interested about general information about a specific wmv file (like frame rate, size, and do not need too defailed information). I ...

Incerease DPI resoultion for web page loaded into WebBrowser conriol in C#

Hi All, We would like to display text and images of an web page in higher DPI for example take 300 DPI, but by default C# webbBrowser control uses 72/96 DPI which is currently system uses. Is their any ways to setup the user defined DPI value to the webbBrowser control so that web page gets rendered in higher DPI value. Any help will ...

XP mode development in Win 7.

Hi, I am a developer and have a XP laptop that I use to dev a SQL 2005 database and MSAccess 2003 frontend database as well as VS2003 website. I want to upgrade to Win 7 using XP mode to install the software above. This is because I still want to install Office 2007 on Win7 etc. Do you think XP mode on Win7 will be reliable enough for...

How to get other system's time using network programming in C#?

I want to get another system's time which is a server where both systems are connected through LAN. Give me some ideas? ...

Auto Update application windows desktop using win32

Hello, I am trying to auto update my current application to new application in windows desktop using win32 api . And my application is running in background. so is there any api Microsoft providing for auto updating application or is there any procedure .please help me so that i can make update my appilication in windows desktop in vs 2...

Sending Byte[][] inbetween C++ unmanaged dll and C# managed dll.

I have an unmanaged C++ dll that exports the following methods: ERASURE_API void encode(unsigned char ** inp, unsigned char ** outp, unsigned int *block_nums, size_t num_block_nums, size_t sz); ERASURE_API void decode(unsigned char ** inp, unsigned char ** outp, unsigned int * index, size_t sz); Size of inp and outp can be...

Is it possible to setup a web server for asp and asp.net on linux?

I know it's MS's product, but is it neccesary that it's hosted in windows environment? More specificly,I need it to run in Fedora ...

How exactly do I config DCOM to load my DLL into a separate process?

I'm trying to force an existing native C++ ATL in-proc COM server into a separate process. I hope DCOM can do this for me without changing the COM server. I started with a usual registry setup - I have a HKCR\CLSID{classId} entry and an InProcServer32 key there specifying the path to the .dll file. I generated an application id (GUID) ...

Can't start deluge

i'm using windowsXp, sp3 ,setup deluge-1.2.0_rc3-win32-setup.exe, but when i try \deluge\deluge-python\deluge.exe , an error happen [error] init:1982 Dll load failed: The specified module could not be found. ... ... .. ImportError: Dll load failed: The specified module could not be found. [error] xxxxxx ui:147 There was an error whilst l...

Which do I choose for hosting my in-proc server in a separate process - COM+ or DCOM?

I need to shield a 64-bit COM component consumer from the 32-bit native C++ ATL in-proc COM component. Seems like both COM+ and DCOM can host my in-proc component in a separate process and do the marshalling so that both me and the consumer application don't care of it and I even don't have to change my in-proc component at all. I tried...

setting up virtualenv for django development on windows,

Hi, Setting up a virtualenv for the first time, when i try to install MySQL-python using pip -E <<some virtual env>> install MySQL-python i get File "setup_windows.py", line 7, in get_config serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) WindowsError: [Error 2] The system cannot find the file ...

How to split a string in a Windows batch file?

Suppose I have a string "AAA BBB CCC DDD EEE FFF". How can I split the string and retrieve the nth substring, in a batch file? The equivalent in C# would be "AAA BBB CCC DDD EEE FFF".Split()[n] EDIT Thanks for the helpful answers. In the end I decided that this was trying to make a batchfile perform unnatural acts, so I went with...

How to stop application from executing

I am working on a project to prevent applications from being launched from removable devices. Does anyone out there know how i can do this? Preferrably in C++ on the Windows platform. My aim is to prevent execution of the exe file even if the user double clicks it or even if he tries to launch it from the command line. ...

python app to exe not working on WinSRV2003

Hi, I created little app for sending out emails when something is wrong with server. Used py2exe to create exe file. While it is works absolutely fine on Win7 i have problems with running it on WinSRV2003. I do not believe that it has something to do with code itself. Please see imports below import pyodbc, sys, smtplib, os from dat...