Click here to Skip to main content
15,895,370 members
Home / Discussions / C#
   

C#

 
GeneralRe: msbuild success/failure condition c# Pin
jschell6-Mar-12 8:39
jschell6-Mar-12 8:39 
AnswerRe: msbuild success/failure condition c# Pin
PIEBALDconsult6-Mar-12 7:11
mvePIEBALDconsult6-Mar-12 7:11 
QuestionBinding combo-box to Entity Data Model Pin
pmcm6-Mar-12 4:44
pmcm6-Mar-12 4:44 
AnswerRe: Binding combo-box to Entity Data Model Pin
RobCroll6-Mar-12 10:48
RobCroll6-Mar-12 10:48 
GeneralRe: Binding combo-box to Entity Data Model Pin
pmcm6-Mar-12 22:37
pmcm6-Mar-12 22:37 
QuestionGetting information about a process's handles. Pin
Septimus Hedgehog6-Mar-12 2:09
Septimus Hedgehog6-Mar-12 2:09 
AnswerRe: Getting information about a process's handles. Pin
Eddy Vluggen6-Mar-12 5:20
professionalEddy Vluggen6-Mar-12 5:20 
AnswerRe: Getting information about a process's handles. Pin
Dave Kreskowiak6-Mar-12 5:35
mveDave Kreskowiak6-Mar-12 5:35 
PHS241 wrote:
Hopefully this'll be a quick one to answer for me.


Handle snooping is anything but quick.

PHS241 wrote:
It's possible that some information I'm looking for might be buried in those 190 handles.


It sounds as though you're trying to make the OpenFileDialog in your app a modal child window of another app. I don't see this working as "modal" is a code flow control operation, but a window ownership one.

The handles you're seeing are not just for Windows and controls. They cover LOTS of other things, like DLL's, pens, brushes, other GDI objects, files, mutexes, threads, ..., the list goes on and on.

PHS241 wrote:
If the Process object knows how many there are, it knows how to discover some information about them, no?


No. You can't find a method because there is no managed code method provided to do this. There is no collection of a processes handles and no exposed methods for getting one.

Handle snooping can be done as there are already lots of tools out there that can do this. BUT, it can only be done by an Administrator account. So if you're thinking of trying this in an application used by normal users, your idea is already dead in the water.

There is no "text" property of a handle. A handle is nothing but an identifier for an object. You then have to probe the object to find out what it is. But...

This is a NASTY procedure to go through to get at the handles of a process. You can find a C example here[^], about half way down the page, a post by AdaraCD.

GeneralRe: Getting information about a process's handles. Pin
Septimus Hedgehog6-Mar-12 6:50
Septimus Hedgehog6-Mar-12 6:50 
GeneralRe: Getting information about a process's handles. Pin
Septimus Hedgehog6-Mar-12 23:51
Septimus Hedgehog6-Mar-12 23:51 
QuestionHow do you enforce use of dedicated factories? Pin
GParkings6-Mar-12 0:07
GParkings6-Mar-12 0:07 
AnswerRe: How do you enforce use of dedicated factories? Pin
BobJanova6-Mar-12 0:40
BobJanova6-Mar-12 0:40 
GeneralRe: How do you enforce use of dedicated factories? Pin
GParkings6-Mar-12 1:01
GParkings6-Mar-12 1:01 
GeneralRe: How do you enforce use of dedicated factories? Pin
BobJanova6-Mar-12 1:58
BobJanova6-Mar-12 1:58 
GeneralRe: How do you enforce use of dedicated factories? Pin
GParkings6-Mar-12 2:30
GParkings6-Mar-12 2:30 
GeneralRe: How do you enforce use of dedicated factories? Pin
jschell6-Mar-12 8:54
jschell6-Mar-12 8:54 
AnswerRe: How do you enforce use of dedicated factories? Pin
Eddy Vluggen6-Mar-12 0:46
professionalEddy Vluggen6-Mar-12 0:46 
GeneralRe: How do you enforce use of dedicated factories? Pin
GParkings6-Mar-12 1:03
GParkings6-Mar-12 1:03 
AnswerRe: How do you enforce use of dedicated factories? Pin
Eddy Vluggen6-Mar-12 5:19
professionalEddy Vluggen6-Mar-12 5:19 
GeneralRe: How do you enforce use of dedicated factories? Pin
GParkings6-Mar-12 5:51
GParkings6-Mar-12 5:51 
GeneralRe: How do you enforce use of dedicated factories? Pin
Eddy Vluggen6-Mar-12 6:55
professionalEddy Vluggen6-Mar-12 6:55 
AnswerRe: How do you enforce use of dedicated factories? Pin
PIEBALDconsult6-Mar-12 2:28
mvePIEBALDconsult6-Mar-12 2:28 
AnswerRe: How do you enforce use of dedicated factories? Pin
SledgeHammer016-Mar-12 6:30
SledgeHammer016-Mar-12 6:30 
GeneralRe: How do you enforce use of dedicated factories? Pin
GParkings6-Mar-12 6:45
GParkings6-Mar-12 6:45 
GeneralRe: How do you enforce use of dedicated factories? Pin
SledgeHammer016-Mar-12 6:56
SledgeHammer016-Mar-12 6:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.