Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / March 2007

Tip: Looking for answers? Try searching our database.

VS2005 Macro issue with clipboard.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dale - 04 Mar 2007 03:08 GMT
I have a couple macros that I have been using for some time with Visual
Studio 2005.  Both do pretty close to the same thing; when I select some
private fields in a class, they both copy the selection to the clipboard,
write code to work with that selection, and then store the code in the
clipboard for pasting into the source file.  One creates properties from the
selected fields and the other creates a constructor to initialize the
selected fields.

Tonight, when trying to run the macros, I get the following error message:

"Microsoft Visual Studio Macros Runtime Server has encountered a problem and
needs to close."

If I take the error message dialog's offer to debug, I find the following
System.Runtime.InteropServices.ExternalException caused the issue:

"Requested Clipboard operation did not succeed."

Once the error occurs, I cannot even edit the macros.  If I try to edit
them, I get an error that says the RPC server is not available.

If I switch to another already open instance of VS2005, I can open the macro
to edit.  If I try to run the macro, I get the same sequence as before and
now cannot open the macro to edit.

Dale
Signature

Dale Preston
MCAD C#
MCSE, MCDBA

Walter Wang [MSFT] - 05 Mar 2007 02:18 GMT
Hi Dale,

Is this issue reproducible using some of your macro code?

Basically such clipboard issue is because some other process has the
clipboard open; remember there's only one process could open the clipboard
at a time.

Please refer to following thread for more information on how to
troubleshooting such issue:

#Clipboard.Clear() problem in dotnet.languages.csharp
http://msdn.microsoft.com/newsgroups/managed/default.aspx?dg=microsoft.publi
c.dotnet.languages.csharp&tid=2f36330b-3ef6-41b1-a174-5b7b4524afac&cat=en-us
-msdnman&lang=en&cr=US&sloc=en-us&m=1&p=1

Sincerely,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Dale - 07 Mar 2007 03:21 GMT
I created the application for determining what has the clipboard locked.  
When I rebooted, the problem went away and Windows sent about 5 or 6 error
reports to Microsoft about the VS 2005 macro service shutting down
unexpectedly.

I will have to wait until the problem reproduces to see what is causing it
but, based on what I have read elsewhere, it sounds like it will be Office
since I had been working in Word just before this started.

It seems bad that a single errant application can cause the clipboard to not
work for all applications.

Thanks for your help, Walter.  I will post back if the problem reoccurs.

Dale
Signature

Dale Preston
MCAD C#
MCSE, MCDBA

> Hi Dale,
>
[quoted text clipped - 37 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT] - 07 Mar 2007 08:45 GMT
Hi Dale,

Thank you for posting updated information. Please feel free to let me know
when the issue occurs again.

I think clipboard will have to work in this way since it's a global shared
resource, once an application is opening it, others will have to wait, :)

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.