windows

Windows: How to canonicalize a file to the special folder?

i want to to persist some filenames for the user (e.g. recent files). Let's use six example files: c:\Documents & Settings\Ian\My Documents\Budget.xls c:\Documents & Settings\Ian\My Documents\My Pictures\Daughter's Winning Goal.jpg c:\Documents & Settings\Ian\Application Data\uTorrent c:\Documents & Settings\All Users\Application Data...

Windows service permission to read shared folder

Hi, I'm trying to run a windows service that reads a file in a shared folder in another server. The problem is that the computer where the service runs is in a different domain (say DomainA) than the computer where the folder is shared (say DomainB). If I go to the computer in DomainB, I can't assign permissions to users in DomainA, beca...

ERROR with winexe

I try to connect to windows from a debian using winexe, but it give me this error ERROR: Cannot open control pipe - NT_STATUS_ACCESS_DENIED Why is that?? What can I do for fix it?? Somebody helpme please!! ...

how in .net i handle a click over a balloon tip, displayed through ShowBalloonTip of a TrayIcon

I use ShowBalloonTip method of a TrayIcon class to display a balloon tip. Is there a way to handle a click over this balloon? When i click over the balloon no event seem to be generated, and it only closes the balloon. ...

Accessibility: Managed vs Unmanaged code

I'm about to begin working on a Accessibility project for Windows (targeting XP through 7) and would like some advice on the pros an cons of using managed code vs unmanaged code. Basically the software will need to be able to read text from open windows, access menus, and other common functions programs like a JAWS or another screen read...

How do I get the length of a file with a path longer than 260 characters?

I am trying to find especially large files on a file share with deeply nested folders. They aren't my folders, so I don't get to rearrange them. The usual way to get the length of a file is: string fullPath = "C:\path\file.ext"; FileInfo info = new FileInfo(fullPath); long len = info.Length; If the length of the path is greater than...

Can a batch file execution step through sequence without completing a java process?

Does a batch file execute processes in sequence only if the previous step has completed and released all file/process locks? Suppose I have the following cmd file (mybatchfile.cmd) echo. |TIME java myjar.jar echo. |TIME and I pipe the results to a log file. Can I be 100% confident (on windows) that my java process has completed and...

C#, WPF, Visual Studio 4: irregular shape color filling

I am creating a Paint application with C#, WPF, and Visual Studio 4. Just like MS Paint, the user can draw lines and shapes. How do I fill a user drawn irregular shape with color? Is there a library for doing something like this? Detecting a closed loop that is created by lines seem like an impractical approach. I can imagine all ...

will pen drive information same on both windows and Mac ?

Hi... Greetings to all.. I have a pen drive which is a make of Trensend .... Whether the product and vendor id of the above pen drive will be same on both windows and Mac operating systems..or will it be different .. Thank you ...

Is using implicit conversion for an upcast instead of QueryInterface() legal with multiple inheritance?

Assume I have a class implementing two or more COM interfaces (exactly as here): class CMyClass : public IInterface1, public IInterface2 { }; QueryInterface() must return the same pointer for each request of the same interface (it needs an explicit upcast for proper pointer adjustment): if( iid == __uuidof( IUnknown ) ) { *ppv ...

Reading lines from a text file in batch file

I know this has been asked 100 times before but every bit of code I try just doesn't seem to work. I am trying to compile a file and then check for a error file and read it line by line and dump it into command line: This is what I have so far: Set var1= %1 Set var2= %var1:.mb=.ERR% echo %var1% echo %var2% "C:\Program Files\MapInfo\...

fopen problem - too many open files

I have a multithreaded application running on Win XP. At a certain stage one of a threads is failing to open an existing file using fopen function. _get_errno function returns EMFILE which means Too many open files. No more file descriptors are available. FOPEN_MAX for my platform is 20. _getmaxstdio returns 512. I checked this with WinD...

Resolve host name to an ip address

I developed a client/server simulation application. I deployed client and server on two different Windows XP machines. Somehow, the client is not able to send requests to the server. I tried below options: 1. Pinged server machine successfully from client using ipaddress. 2. Pinged client machine successfully from server using ipaddre...

Nant - Check if a remote share already exists

We are using Nant to deploy an application and need to ensure that a share is created during the process. We use psexec and net share to create the share but this fails and stops Nant if the share already exists. Is there any way to detect that a share exists already? Either before trying to create the share or being able to detect t...

Where to find list of default dll files available on Windows (XP, Vista, 7, ...) ?

Is there some list of .dll files that are available on the various freshly-installed Windows platforms (or at least, the recent ones like Win XP and Win 7)? I am looking for a list similar to this one for Windows 2000. (I am compiling a python app with py2exe, and the application reports which dlls are required for potential distributi...

How to implement a performant filecopy method in C# from a network share ?

Hello, I'm trying to implement a filecopy method that can match the performance a copy done with the windows explorer. For exemple a copy (with the windows explorer) from our nas to my computer, performs above 100mb/sec. My current implementation does the same copy at about 55mb/sec which is already better than the System.IO.File.Copy...

How to execute UNIX command from Windows XP system using ANT

I want to execute a UNIX command from my local Windows XP system using ANT script. UNIX system is a remote server. I have tried the following: <target name="execute" > <sshexec host="host IP" username="uname" password="pass" commandResource="sh abc.sh"/> </target> but got the error below: BUILD FAILED ..\bui...

assigning / validation of signature using RSA (PKCS 7)

Any suggestions for simple and fast library for assigning / validation of signature using RSA Cryptographic Messaging Operations (PKCS#7)? ...

Eclipse problem with symbol §

I'm using Eclipse for programming. In one method of my project i used the String "§". I use a svn repository. If i edit the file with Ubuntu OS the § symbol isnt displayed correctly in the eclipse editor and also in my programm, if I edited it before on Windows. The same is vice versa. Any hints how to solve this problem? I don't want t...

Why would a company decide to develop in Ruby on Linux and not on Windows?

Hi guys I would like to know if anyone meet a similar situation. What are the reasons for a company to decide that you must develop using Linux environment (virtual machine) and not Windows environment? Here there's no workstations with Linux at all - all computers have Windows installed. There's one production Linux server. Is it ...