By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,241 Members | 733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,241 IT Pros & Developers. It's quick & easy.

Why does call to Process.GetCurrentProcess() access the floppy drive?

P: n/a
Everytime I call Process.GetCurrentProcess() the system goes out to the
floppy drive. Why does this happen. I decided to use FileMon to get a log
of what is happening when this occurs. Here is the log:

1 4:31:10 PM BlockedConfigAp:1340 IRP_MJ_CREATE A: DASD SUCCESS Attributes:
Any Options: Open
2 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_DEVICE_CONTROL A: DASD INVALID
DEVICE REQUEST IOCTL: 0x560000
3 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLEANUP A: DASD SUCCESS
4 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLOSE A: DASD SUCCESS

Can someone tell me how to prevent the floppy drive access from occurring
when this call is performed?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
va***@diebold.com
-----------------------------------
Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Ken Varn wrote:
|| Everytime I call Process.GetCurrentProcess() the system goes out to
|| the floppy drive. Why does this happen. I decided to use FileMon
|| to get a log of what is happening when this occurs. Here is the log:
||
|| 1 4:31:10 PM BlockedConfigAp:1340 IRP_MJ_CREATE A: DASD SUCCESS
|| Attributes: Any Options: Open
|| 2 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_DEVICE_CONTROL A: DASD
|| INVALID DEVICE REQUEST IOCTL: 0x560000
|| 3 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLEANUP A: DASD SUCCESS
|| 4 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLOSE A: DASD SUCCESS
||
|| Can someone tell me how to prevent the floppy drive access from
|| occurring when this call is performed?
||
|| --
|| -----------------------------------
|| Ken Varn
|| Senior Software Engineer
|| Diebold Inc.
|| va***@diebold.com
|| -----------------------------------

No floppy access when I call GetCurrentProcess() on XP and W2k3.
Are you sure this happens when calling GetCurrentProcess()? What OS version, version of the framework are you running on?

Willy.
Jul 19 '05 #2

P: n/a
I am running .NET Framework 1.1.4322. on a Windows 2000 Pro machine with SP4
on it.

Since my function is calling Process.GetCurrentProcess().ProcessName, it
could be happening on the ProcessName
property call, but it is definitely happening on either GetCurrentProcess or
GetCurrentProcess.ProcessName.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
va***@diebold.com
-----------------------------------
"Willy Denoyette [MVP]" <wi*************@skynet.be> wrote in message
news:ep****************@TK2MSFTNGP12.phx.gbl...
Ken Varn wrote:
|| Everytime I call Process.GetCurrentProcess() the system goes out to
|| the floppy drive. Why does this happen. I decided to use FileMon
|| to get a log of what is happening when this occurs. Here is the log:
||
|| 1 4:31:10 PM BlockedConfigAp:1340 IRP_MJ_CREATE A: DASD SUCCESS
|| Attributes: Any Options: Open
|| 2 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_DEVICE_CONTROL A: DASD
|| INVALID DEVICE REQUEST IOCTL: 0x560000
|| 3 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLEANUP A: DASD SUCCESS
|| 4 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLOSE A: DASD SUCCESS
||
|| Can someone tell me how to prevent the floppy drive access from
|| occurring when this call is performed?
||
|| --
|| -----------------------------------
|| Ken Varn
|| Senior Software Engineer
|| Diebold Inc.
|| va***@diebold.com
|| -----------------------------------

No floppy access when I call GetCurrentProcess() on XP and W2k3.
Are you sure this happens when calling GetCurrentProcess()? What OS version, version of the framework are you running on?
Willy.

Jul 19 '05 #3

P: n/a
Ken,

I can answer why this happens.

Internally the current 1.0 and 1.1 frameworks call performance counters as
part of the Process object. As the perf system initializes, it will load
in various perf objects. When the disk object loads, it will enumerate the
known disks (this is Windows 2000). The disk performance counters changed
between Windows 2000 and XP (2k3).

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '05 #4

P: n/a
hi, Ken

Peter asked me to follow up with you.. There is no supported way to do
this on Win2K. If you want to try something speculative, you can disable
the disk perf counters.
HKLM\SYSTEM\CurrentControlSet\Services\Perfdisk\pe rformance

Add a DWORD value called "Disable Performance Counters" and set it to 1.
No disk monitoring will work now. But their perf will increase.

To reenable these counters, you should delete the key, or set it to 0

This is an ugly, ugly solution, and we do NOT recommend using it. A better
solution would be to physically disconnect the floppy drive, given how
rarely they are used these days.

Please get back to me if you have further questions.

HTH,

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
(c) 2003 Microsoft Corporation. All rights reserved.
--------------------
| Reply-To: "Ken Varn" <va***@diebold.com>
| From: "Ken Varn" <va***@diebold.com>
| References: <ur**************@TK2MSFTNGP10.phx.gbl>
<ep**************@TK2MSFTNGP12.phx.gbl>
<Oy**************@TK2MSFTNGP12.phx.gbl>
<8O**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Why does call to Process.GetCurrentProcess() access the
floppy drive?
| Date: Tue, 15 Jul 2003 12:33:48 -0400
| Lines: 30
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Is there anyway to configure Win 2000 so that it does not go to the floppy
| drive for performance counters? This really kills application performance
| when the floppy drive is accessed.
|
| --
| -----------------------------------
| Ken Varn
| Senior Software Engineer
| Diebold Inc.
| va***@diebold.com
| -----------------------------------
| "Peter Davidson [MS]" <pe******@online.microsoft.com> wrote in message
| news:8O**************@cpmsftngxa06.phx.gbl...
| > Ken,
| >
| > I can answer why this happens.
| >
| > Internally the current 1.0 and 1.1 frameworks call performance counters
as
| > part of the Process object. As the perf system initializes, it will
load
| > in various perf objects. When the disk object loads, it will enumerate
| the
| > known disks (this is Windows 2000). The disk performance counters
| changed
| > between Windows 2000 and XP (2k3).
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
|
|
|

Jul 19 '05 #5

P: n/a
Thanks. That seems to work.

I would think that disconnecting the floppy drive is a much uglier solution
than disabling disk performance counters.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
va***@diebold.com
-----------------------------------
"John Eikanger [MSFT]" <jo****@online.microsoft.com> wrote in message
news:L5**************@cpmsftngxa06.phx.gbl...
hi, Ken

Peter asked me to follow up with you.. There is no supported way to do
this on Win2K. If you want to try something speculative, you can disable
the disk perf counters.
HKLM\SYSTEM\CurrentControlSet\Services\Perfdisk\pe rformance

Add a DWORD value called "Disable Performance Counters" and set it to 1.
No disk monitoring will work now. But their perf will increase.

To reenable these counters, you should delete the key, or set it to 0

This is an ugly, ugly solution, and we do NOT recommend using it. A better solution would be to physically disconnect the floppy drive, given how
rarely they are used these days.

Please get back to me if you have further questions.

HTH,

John Eikanger
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights. (c) 2003 Microsoft Corporation. All rights reserved.
--------------------
| Reply-To: "Ken Varn" <va***@diebold.com>
| From: "Ken Varn" <va***@diebold.com>
| References: <ur**************@TK2MSFTNGP10.phx.gbl>
<ep**************@TK2MSFTNGP12.phx.gbl>
<Oy**************@TK2MSFTNGP12.phx.gbl>
<8O**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Why does call to Process.GetCurrentProcess() access the
floppy drive?
| Date: Tue, 15 Jul 2003 12:33:48 -0400
| Lines: 30
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Is there anyway to configure Win 2000 so that it does not go to the floppy | drive for performance counters? This really kills application performance | when the floppy drive is accessed.
|
| --
| -----------------------------------
| Ken Varn
| Senior Software Engineer
| Diebold Inc.
| va***@diebold.com
| -----------------------------------
| "Peter Davidson [MS]" <pe******@online.microsoft.com> wrote in message
| news:8O**************@cpmsftngxa06.phx.gbl...
| > Ken,
| >
| > I can answer why this happens.
| >
| > Internally the current 1.0 and 1.1 frameworks call performance counters as
| > part of the Process object. As the perf system initializes, it will
load
| > in various perf objects. When the disk object loads, it will enumerate | the
| > known disks (this is Windows 2000). The disk performance counters
| changed
| > between Windows 2000 and XP (2k3).
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
|
|
|

Jul 19 '05 #6

P: n/a
Hi, Ken

From a software perspective hacking the registry this way is like eating
your lunch over the PC motherboard. You REALLY want to do this as little
as possible.

Peter's recommendation is still don't do this. If you must do this, flip
this key value in code just before you call Process.GetCurrentProcess() and
restore it afterward. You do NOT want to leave perf counters disabled.
Make sure you check which OS you are using and only do this on Win2K. If
this is used on a limited set of machines, Get them upgraded to WinXP or
Win2k3 as soon as you can.

HTH,

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
(c) 2003 Microsoft Corporation. All rights reserved.
--------------------
| Reply-To: "Ken Varn" <va***@diebold.com>
| From: "Ken Varn" <va***@diebold.com>
| References: <ur**************@TK2MSFTNGP10.phx.gbl>
<ep**************@TK2MSFTNGP12.phx.gbl>
<Oy**************@TK2MSFTNGP12.phx.gbl>
<8O**************@cpmsftngxa06.phx.gbl>
<eB**************@TK2MSFTNGP10.phx.gbl>
<L5**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Why does call to Process.GetCurrentProcess() access the
floppy drive?
| Date: Wed, 16 Jul 2003 10:40:29 -0400
| Lines: 94
| Organization: Diebold Inc.
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#C**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: 204.151.249.23
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101356
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thanks. That seems to work.
|
| I would think that disconnecting the floppy drive is a much uglier
solution
| than disabling disk performance counters.
|
| --
| -----------------------------------
| Ken Varn
| Senior Software Engineer
| Diebold Inc.
| va***@diebold.com
| -----------------------------------
| "John Eikanger [MSFT]" <jo****@online.microsoft.com> wrote in message
| news:L5**************@cpmsftngxa06.phx.gbl...
| > hi, Ken
| >
| > Peter asked me to follow up with you.. There is no supported way to do
| > this on Win2K. If you want to try something speculative, you can
disable
| > the disk perf counters.
| > HKLM\SYSTEM\CurrentControlSet\Services\Perfdisk\pe rformance
| >
| > Add a DWORD value called "Disable Performance Counters" and set it to 1.
| > No disk monitoring will work now. But their perf will increase.
| >
| > To reenable these counters, you should delete the key, or set it to 0
| >
| > This is an ugly, ugly solution, and we do NOT recommend using it. A
| better
| > solution would be to physically disconnect the floppy drive, given how
| > rarely they are used these days.
| >
| > Please get back to me if you have further questions.
| >
| > HTH,
| >
| > John Eikanger
| > Microsoft Developer Support
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > (c) 2003 Microsoft Corporation. All rights reserved.
| > --------------------
| > | Reply-To: "Ken Varn" <va***@diebold.com>
| > | From: "Ken Varn" <va***@diebold.com>
| > | References: <ur**************@TK2MSFTNGP10.phx.gbl>
| > <ep**************@TK2MSFTNGP12.phx.gbl>
| > <Oy**************@TK2MSFTNGP12.phx.gbl>
| > <8O**************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Why does call to Process.GetCurrentProcess() access the
| > floppy drive?
| > | Date: Tue, 15 Jul 2003 12:33:48 -0400
| > | Lines: 30
| > | X-Tomcat-NG: microsoft.public.dotnet.general
| > |
| > | Is there anyway to configure Win 2000 so that it does not go to the
| floppy
| > | drive for performance counters? This really kills application
| performance
| > | when the floppy drive is accessed.
| > |
| > | --
| > | -----------------------------------
| > | Ken Varn
| > | Senior Software Engineer
| > | Diebold Inc.
| > | va***@diebold.com
| > | -----------------------------------
| > | "Peter Davidson [MS]" <pe******@online.microsoft.com> wrote in message
| > | news:8O**************@cpmsftngxa06.phx.gbl...
| > | > Ken,
| > | >
| > | > I can answer why this happens.
| > | >
| > | > Internally the current 1.0 and 1.1 frameworks call performance
| counters
| > as
| > | > part of the Process object. As the perf system initializes, it will
| > load
| > | > in various perf objects. When the disk object loads, it will
| enumerate
| > | the
| > | > known disks (this is Windows 2000). The disk performance counters
| > | changed
| > | > between Windows 2000 and XP (2k3).
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | >
| > |
| > |
| > |
| >
|
|
|

Jul 19 '05 #7

P: n/a
The Win2K install is on our own device hardware that we control. So
changing the registry is not a problem since we distribute both hardware and
software as a complete system.

It sounds like there is some other issue with disabling disk performance
counters. Is there some negative ramification in doing this? I know that
in Windows NT they were off by default. Is there some reason why they are
on by default in Win2K?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
va***@diebold.com
-----------------------------------
"John Eikanger [MSFT]" <jo****@online.microsoft.com> wrote in message
news:uk**************@cpmsftngxa06.phx.gbl...
Hi, Ken

From a software perspective hacking the registry this way is like eating
your lunch over the PC motherboard. You REALLY want to do this as little
as possible.

Peter's recommendation is still don't do this. If you must do this, flip
this key value in code just before you call Process.GetCurrentProcess() and restore it afterward. You do NOT want to leave perf counters disabled.
Make sure you check which OS you are using and only do this on Win2K. If
this is used on a limited set of machines, Get them upgraded to WinXP or
Win2k3 as soon as you can.

HTH,

John Eikanger
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights. (c) 2003 Microsoft Corporation. All rights reserved.
--------------------
| Reply-To: "Ken Varn" <va***@diebold.com>
| From: "Ken Varn" <va***@diebold.com>
| References: <ur**************@TK2MSFTNGP10.phx.gbl>
<ep**************@TK2MSFTNGP12.phx.gbl>
<Oy**************@TK2MSFTNGP12.phx.gbl>
<8O**************@cpmsftngxa06.phx.gbl>
<eB**************@TK2MSFTNGP10.phx.gbl>
<L5**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Why does call to Process.GetCurrentProcess() access the
floppy drive?
| Date: Wed, 16 Jul 2003 10:40:29 -0400
| Lines: 94
| Organization: Diebold Inc.
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#C**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: 204.151.249.23
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101356
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thanks. That seems to work.
|
| I would think that disconnecting the floppy drive is a much uglier
solution
| than disabling disk performance counters.
|
| --
| -----------------------------------
| Ken Varn
| Senior Software Engineer
| Diebold Inc.
| va***@diebold.com
| -----------------------------------
| "John Eikanger [MSFT]" <jo****@online.microsoft.com> wrote in message
| news:L5**************@cpmsftngxa06.phx.gbl...
| > hi, Ken
| >
| > Peter asked me to follow up with you.. There is no supported way to do | > this on Win2K. If you want to try something speculative, you can
disable
| > the disk perf counters.
| > HKLM\SYSTEM\CurrentControlSet\Services\Perfdisk\pe rformance
| >
| > Add a DWORD value called "Disable Performance Counters" and set it to 1. | > No disk monitoring will work now. But their perf will increase.
| >
| > To reenable these counters, you should delete the key, or set it to 0
| >
| > This is an ugly, ugly solution, and we do NOT recommend using it. A
| better
| > solution would be to physically disconnect the floppy drive, given how
| > rarely they are used these days.
| >
| > Please get back to me if you have further questions.
| >
| > HTH,
| >
| > John Eikanger
| > Microsoft Developer Support
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > (c) 2003 Microsoft Corporation. All rights reserved.
| > --------------------
| > | Reply-To: "Ken Varn" <va***@diebold.com>
| > | From: "Ken Varn" <va***@diebold.com>
| > | References: <ur**************@TK2MSFTNGP10.phx.gbl>
| > <ep**************@TK2MSFTNGP12.phx.gbl>
| > <Oy**************@TK2MSFTNGP12.phx.gbl>
| > <8O**************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Why does call to Process.GetCurrentProcess() access the
| > floppy drive?
| > | Date: Tue, 15 Jul 2003 12:33:48 -0400
| > | Lines: 30
| > | X-Tomcat-NG: microsoft.public.dotnet.general
| > |
| > | Is there anyway to configure Win 2000 so that it does not go to the
| floppy
| > | drive for performance counters? This really kills application
| performance
| > | when the floppy drive is accessed.
| > |
| > | --
| > | -----------------------------------
| > | Ken Varn
| > | Senior Software Engineer
| > | Diebold Inc.
| > | va***@diebold.com
| > | -----------------------------------
| > | "Peter Davidson [MS]" <pe******@online.microsoft.com> wrote in message | > | news:8O**************@cpmsftngxa06.phx.gbl...
| > | > Ken,
| > | >
| > | > I can answer why this happens.
| > | >
| > | > Internally the current 1.0 and 1.1 frameworks call performance
| counters
| > as
| > | > part of the Process object. As the perf system initializes, it will | > load
| > | > in various perf objects. When the disk object loads, it will
| enumerate
| > | the
| > | > known disks (this is Windows 2000). The disk performance counters | > | changed
| > | > between Windows 2000 and XP (2k3).
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no | > | rights.
| > | >
| > |
| > |
| > |
| >
|
|
|

Jul 19 '05 #8

P: n/a
This is a known bug which will be fixed in next release.
The reason is that Process is trying to get index for some performance
counters.

Thanks,
Gang Peng
[MS]

"Ken Varn" <va***@diebold.com> wrote in message
news:Oy**************@TK2MSFTNGP12.phx.gbl...
I am running .NET Framework 1.1.4322. on a Windows 2000 Pro machine with SP4 on it.

Since my function is calling Process.GetCurrentProcess().ProcessName, it
could be happening on the ProcessName
property call, but it is definitely happening on either GetCurrentProcess or GetCurrentProcess.ProcessName.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
va***@diebold.com
-----------------------------------
"Willy Denoyette [MVP]" <wi*************@skynet.be> wrote in message
news:ep****************@TK2MSFTNGP12.phx.gbl...
Ken Varn wrote:
|| Everytime I call Process.GetCurrentProcess() the system goes out to
|| the floppy drive. Why does this happen. I decided to use FileMon
|| to get a log of what is happening when this occurs. Here is the log:
||
|| 1 4:31:10 PM BlockedConfigAp:1340 IRP_MJ_CREATE A: DASD SUCCESS
|| Attributes: Any Options: Open
|| 2 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_DEVICE_CONTROL A: DASD
|| INVALID DEVICE REQUEST IOCTL: 0x560000
|| 3 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLEANUP A: DASD SUCCESS
|| 4 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_CLOSE A: DASD SUCCESS
||
|| Can someone tell me how to prevent the floppy drive access from
|| occurring when this call is performed?
||
|| --
|| -----------------------------------
|| Ken Varn
|| Senior Software Engineer
|| Diebold Inc.
|| va***@diebold.com
|| -----------------------------------

No floppy access when I call GetCurrentProcess() on XP and W2k3.
Are you sure this happens when calling GetCurrentProcess()? What OS

version, version of the framework are you running on?

Willy.


Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.