PC Review


Reply
Thread Tools Rate Thread

Anyone ever seen this "System.ComponentModel.Win32Exception: Access is denied Exception."

 
 
Microsoft News
Guest
Posts: n/a
 
      4th Nov 2005
I have a program that is printing PDFs and to check that the PDF is complete
we run the following code after we are done printing.

lpsProcesses = Process.GetProcesses

For Each lpsProcess In lpsProcesses
If lpsProcess.ProcessName.CompareTo("Acrobat") = 0 Then
lpsProcess.Close()
End If
Next

Now this works great on most of my users computer. But on some users
computers, all at the same company, on the same domain, etc. this code
generates the following error:

System.ComponentModel.Win32Exception: Access is denied
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32
access, Boolean throwIfExited)
at System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId)
at System.Diagnostics.Process.get_Modules()
at System.Diagnostics.Process.get_MainModule()
at System.Diagnostics.Process.get_ProcessName()
at ActNotesMod.frmPreview.PrintPA(IPDFPrinter pobjPrinter, Boolean
pbUseDefaultPrinter, String psPrinterName)
at ActNotesMod.frmActNotes.OutputPDF(Boolean pbPrint)

It is my belief that the problem is some type of rights issue with some
process that I do not know. Anyone out there that knows what a user has to
have rights to in order to run this code and use the "System.Diagnostics"
object?

The file they are printing is in their Document and Settings folder so they
have full access. They are network users so they are not admins on the
computers.

Any help would be GREAT!!!!!!!!!!

Clyde




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.ComponentModel.Win32Exception: Access is denided shahin Microsoft ASP .NET 0 30th Aug 2007 03:54 PM
System.ComponentModel.Win32Exception: Access is denied tushar Microsoft C# .NET 1 18th Jul 2007 03:46 PM
Anyone ever seen this "System.ComponentModel.Win32Exception: Access is denied Exception." Microsoft News Microsoft VB .NET 3 2nd Nov 2005 09:49 PM
System.ComponentModel.Win32Exception: Access is denied =?Utf-8?B?UGF1bA==?= Microsoft ASP .NET 4 18th Feb 2005 03:27 PM
Keep getting "Error creating window handle" System.ComponentModel.Win32Exception for unknown reason Hasani Microsoft Dot NET Framework Forms 1 22nd Nov 2003 07:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 PM.