windows

spaces not being recorded in macro

hi there I'm recording a macro, that supposed to make 3 spaces and than go back to the start point and than go to line below. It used to work with previous version of npp, but now instead of spaces it creates (DC) how to force macro to put spaces instead of (DC) thing? thanks Adam ...

converting contents of a "string array" AKA SAFEARRAY to wchar

I'm using WMI to read DefaultIPGateway on the WMI object Win32_NetworkAdapterConfiguration. The MSDN says it's a "String Array" and visual studio interprets this as a SAFEARRAY on the VARIANT object returned when you query the WMI. How do you access the information inside the array? How do you convert each element to a wchar* or char*? ...

file handling routines on Windows

Is it allowed to mix different file handling functions in a one system e.g. fopen() from cstdio open() from fstream CreateFile from Win API ? I have a large application with a lot of legacy code and it seems that all three methods are used within this code. What are potential risks and side effects ? ...

Rake on windows - copy directory to another server

Hi, I want to use rake to deploy a .net website to a windows server... Bit new at this and getting stuck with the very simple stuff... How would I copy a directory from a local folder to a different windows server? At the moment I have: task :default => :CWS_Web_application desc 'Depoly CWS Web application to preview environment' t...

Is it necessary to test my application on all Windows OS's AND all editions of each?

I will be testing an application that claims to run on Windows XP, Windows Vista, and Windows 7. I know that I have to test the application for each of those on 32-bit and 64-bit (if it exists), but I'm not sure if it's necessary to test each edition of each operating system. For example, do I really need to test for Windows 7 Starter ...

Using subprocess to find out when a process ends

I wish to sequentially run some c scripts that fork their own processes (in a new command line window) and give the "Press any key to continue..." when they are completed. Technically, it is a special compiler. It pops up with acommand line window and tells me whether the compile was successful or not. But that command line window for...

ServiceBase.OnShutdown and event logs in Windows .Net 3.5

I've written a custom service that overrides ServiceBase.OnShutdown(). Unfortunately, when I log to the event log, nothing is written. My guess is that the Windows event log was shut down before my service. Is there a way to order service shutdown so that my servce shuts down before the event logger? I don't want to have to write out to ...

DSSCL_EXCLUSIVE not giving exclusive audible output. DirectSound

Hi guys, Very simple question. In the MSDN documentation for the DirectSound API they state that when my application is in focus it will be the only audible program. This is exactly what I want to happen, however when setting this flag and playing sound through my application, I can still hear the background music on my computer. So t...

How to make an application HAVE a form but not BE a form?

I want my C# .NET application to have a form but not be a form. When I normally startup a windows forms application, it's like the form is the master of everything else that follows: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.R...

IIS 7 godaddy.com web.config file

Hello, I am new to the windows web server and have not the knowledge of syntax for web.config file. We have under Windows IIS7 an Wordpress installation and for that wordpres generated few lines for a web.config file. Here is the content of the web.config file: 1.with this content our /stats directory and Webstats is no more accessible...

Getting TCP Socket statistics in Windows

Is there a way to get a specific socket statistics in windows? I'm most interested in the number of retransmissions a specific socket had, and doing it without using winpcap or similar solutions. Windows should store such an interesting number somewhere, no? ...

How to write Russian characters in file?

In console when I'm trying output Russian characters It gives me ??????????????? Who know why? I tried write to file - in this case the same situation. for example f=open('tets.txt','w') f.write('some russian text') f.close inside file is - ?????????????????????????/ or p="some russian text" print p ????????????? In additional...

How do I map a network drive that requires a username and password in .NET?

I need to map a network drive from within a .NET application. I'm going to need to use an AD Username and Password to authenticate. Usually I just use a batch file with the net use command. How do I do this from within C# or VB.NET code? ...

How to I copy a file from a computer that requires authentication to my local machine?

When I use: File.Copy(strRemoteFolder, strLocalFolder) I get an UnauthorizedAccessException with the following message: "Access to the path ... is denied." In .NET, how do I copy a file from a remote computer that requires authentication to my local machine? I understand that I'm going to need to supply a username and password in so...

File not found error with LoadImage() (Windows)

EDIT: I've added a few more lines of the program to the code snippet below. I have the following line of code in a program BITMAP BMP; HBITMAP hBMP; hBMP = (HBITMAP)LoadImage(GetModuleHandle(NULL), "Test.bmp", IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE); if (!hBMP) return 1; GetObject(hBMP, sizeof(BMP), &BMP); and wh...

Windows memory allocation questions.

I am currently looking into malloc() implementation under Windows. But in my research I have stumbled upon things that puzzled me: First, I know that at the API level, windows uses mostly the HeapAlloc() and VirtualAlloc() calls to allocate memory. I gather from here that the Microsoft implementation of malloc() (that which is included ...

sed - how to delete everything but the last n lines ?

On a windows box (no CYGWIN etc) using sed how can you "delete all but the last n lines" from a text file ? On *nix you could get tail/cat/wc involved to pre-process the input file but how can you do this using pure sed ? [FWIW the sed is the GNU sed; the platform is Windows 2003]. ...

Best method for comparing windows directory names

Possible Duplicate: How can I compare (directory) paths in C#? I have a filename and a directory name and I want to determent if the file is in the directory. My first thought was to use string comparison and check that the filename string starts with the directory name string. However, that would fail in the case where the di...

What is the correct way to implement a Managed Property Handler Shell Extension?

Now that .NET CLR 4.0 supports side by side (SxS) operation it should now be possible to write shell extensions in managed code. I have attempted this and successfully coded a Property Handler that implements IPropertyStore, IInitializeWithStream and IPropertyStoreCapabilities. The handler works fine and is called as expected when...

Application path location in MS windows

Where should I store the application installation folder for application to reffer ? ...