windows

MFC CFindReplaceDialog destruction

How can I destroy a pointer to CFindReplaceDialog object properly? For example I have class: class CjumpView : public CRichEditView { CFindReplceDialog *m_pFRDlg; // ... }; CjumpView::CjumpView() : m_pFRDlg(NULL) { } CjumpView::~CjumpView() { if(m_pFRDlg != NULL) { m_pFRDlg->DestroyWindow(); delete(m_pFRD...

How can I reboot a Windows XP64 Machine in a Python Script?

How can I reboot a Windows XP64 Machine in a Python Script? This machine does not have the "shutdown" or "restart" executables available. ...

is there a replacement for unistd.h for Windows (Visual C)?

I'm porting a relatively simple console program written for unix to the Windows platform. (VC++ 2005). All the source files include "unistd.h", which doesn't exist. Removing it, i get complaints about misssing prototypes for 'srandom', 'random', and 'getopt'. I know I can replace the random funcs, and I'm pretty sure I can find/hack-u...

Running untrusted third party software

What's the best way to protect system integrity while running possibly malicious third party executables? I would like to allow a program to be able to store some information for its own use during execution, but disallow access to the network and to devices, and of course to other users' data and the overall system. A few constraints:...

Is there a GTK terminal component that can be used under Windows?

I need to build a terminal-like application that needs to be used under my usual Ubuntu install but also under Windows. I've been looking for a terminal component that accepts commands and is able to show some kind of command history together with output. There is a component called VTE that is used in gnome-terminal, but I have not bee...

Java File I/O Performance Decreases Over Time

I'm trying to perform a once-through read of a large file (~4GB) using Java 5.0 x64 (on Windows XP). Initially the file read rate is very fast, but gradually the throughput slows down substantially, and my machine seems very unresponsive as time goes on. I've used ProcessExplorer to monitor the File I/O statistics, and it looks like th...

reformatting windows lnk file via automated script

Problem: There are a bunch of .lnk files on C drive that point to the J: drive, but the J: drive is gone the P: drive has replaced it. Various tricks have been done to get the .lnk files to still work anyway, but it's getting annoying and it's time to just fix the things. Question: Using Ruby, Python, WSH.JScript or Perl, can you iterat...

How to use ReadDirectoryChangesW() method with completion routine?

I want to use function ReadDirectoryChangesW() in asynchronous mode with I/O completion routine supplied. The question is I don't know how to retrieve the exact information about the change in the completion routine (a CALLBACK function). Completion routine is defined like this: VOID CALLBACK FileIOCompletionRoutine( [in] ...

How can I capture the output of an Executable in an image?

I want to capture the output of an exe file as an png or jpg image, i mean the display of that exe. Is there any command on windows to capture and save as image of an exe output or any other idea that i can do this. ...

Extract Icon from Windows .lnk (shortcut) file.

I need to extract the icon from a windows shortcut (.lnk) file (or find the icon file, if it's just pointed to by the shortcut). I'm not asking about extracting icons from exe's, dll's, etc. The shortcut in question is created when I run a installation program. And the icon displayed by the shortcut is not contained in the .exe that t...

Network Drive label

Hello, I'm trying to get the label of some network resources mapped as drives. When I use DriveInfo.GetDrives(), local volumes have the VolumeLabel filled parameter as expected, but in network drives it is an empty string. How can I get those labels? ...

Memcached client for Windows in C or C++?

I need a portable C/C++ solution, so I'm looking for a C/C++ client library for Memcached that work on both Windows and Unix. Any suggestions? ...

Finding out the file name of the running batch file

Inside a windows batch file I'd like to figgure out what the fully qualified path name of this batch file is. I tried %0 but this does only give me the typed command (e.g. just the file name without path or extension). ...

ignore directories in git using windows

anyone know how i can ignore directories in git using msysgit on windows? ...

Displaying Error Message from C# AfterInstall Event

Hi Can someone please tell me how to display error message in C# during execution of AfterInstallEvent? My project uses the Microsoft set-up and deployment project and then I have created a class that is called when the AfterInstall event is fired. MessageBox.Show(); doesn't work..."The name 'MessageBox' does not appear in the curre...

How do you create (and read) windows shortcut(.lnk file) in Java?

Same question, different langauge. How do you do it in Java? Do you use JNI? run exe? or are there any library read/write *.lnk like POI read/write *.xls? I used to workaround to create ".url" which is plain text INI file. But I am looking for other interesting way to do it. ...

How to derive class from CFindReplaceDialog? (MFC)

Is it possible to derive custom-built dialog from CFindEditDialog? I want to build a dialog template in Viasual Studio Resource Builder (to draw it), then to hide the default Find dialog window and to use my instead. MSDN says: To customize the dialog box, derive a class from CFindReplaceDialog, provide a custom dialog template,...

How re-detect an USB Flash Memory by software?

Dears, After selecting "Safe Remove" option in windows system tray, is there any way that I can re-detect my Flash by a code, without plug it out and again inserting it to the computer USB port? Best Regards ...

Resize Encrypted Windows Partition

Recently my company forced a roll out of SafeBoot. The problem is that I was using Ubuntu under Wubi. Since the whole drive is encrypted now, I can't boot into Ubuntu. I was hoping to create a new partition for Ubuntu so I could still use it. I know there are partition tools available, but I've never used one on an encrypted disk. Are pr...

Can anyone recommend a good backup "system" for a developer?

I'm known around the office as "the backup guy". As a developer, I often jump back and forth between projects, and as a result I don't always remember exactly what changes were present in each when I return to them. I usually have to compare my local changes versus those in our source control system, and then I'll eventually remember it ...