Questions tagged [openprocess]
50 questions
0
votes
1 answer
VB6 application causes install to show up
I got a weird problem with my VB app that has got me very confused. I am updating an existing program. I had to add some processing queue capabilities. On my system, unit testing worked great but when I compile it and run it on a different…

user940769
- 53
- 2
- 9
0
votes
1 answer
How to find & close all open file handles on a removable drive (before ejecting)
I'm trying to eject a (virtual) removable drive, and it fails because there are some file handles open, maybe explorer windows. What's the best way to get all the open handles to files on that drive and close them?
Is it also feasible (within…

Pranab
- 2,207
- 5
- 30
- 50
0
votes
1 answer
Detect any program that uses OpenProcess?
to protect my program I'd like to have a check that detects any program that executes OpenProcess with my PID? I want to prevent that other programs can get a handle to my program easily.
What options do I have? (WinAPI and so on)
Does my program…

Nicolai
- 328
- 2
- 10
0
votes
1 answer
How to open a file from a stream in Notepad
To open a file I could do this like
Process.Start(fileName)
For this it is necessary that the file exists in the file system. Now I use a XmlDocument object and want to open the content in an external program like Notepad. I save the xml content in…

mburm
- 1,417
- 2
- 17
- 37
-4
votes
1 answer
OpenProcess returns error code 6(ERROR_INVALID_HANDLE)
I try to get a handle to a running process using the OpenProcess function. However, when checking the error code I get an error code of 6 (ERROR_INVALID_HANDLE).
Here is a reduced sample:
using System;
using System.Runtime.InteropServices;
using…

Tobilo
- 1
- 3