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 / April 2006

Tip: Looking for answers? Try searching our database.

Problem with 2005 - RegisterLibMgr

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred Heida - 11 Apr 2006 03:59 GMT
Hi All,

I'm try to, using the Managed C# SDk, to create a library... but i'm getting
the
errror 'Attempted to read or write protected memory. This is often an
indication that other memory is corrupt."
when i call RegisterLibMgr..

my code looks like...
in my package i do  IVsObjectManager objManager =
this.GetService(typeof(IVsObjectManager)) as IVsObjectManager;
then i create my library manager , like  IVsLibraryMgr libManager = new
SMLibraryManager(model) as IVsLibraryMgr;
and then i call
   uint cookie;
   Guid guid = libManager.GetType().GUID;
   objManager.RegisterLibMgr(ref guid, libManager, out cookie);

which gives the error..

the LibManager creates a libray that implmentes the IVSLibrary, and i can
see that the IVsLibraryMgr.GetCount,  IVsLibraryMgr.GetLibraryAt and the
IVsLibrary.GetGuid are being call during the RegisterLibMgr call,. but after
the IVsLibrary.GetGuid is called,  then i see the exception "Attempted to
read or write protected memory. This is often an indication that other
memory is corrupt."..

any one see this ? i tried to look for other C# samples.. byt could not find
any.. are there any C# samples that implment this so i can see what i migt
be missing.??

Cheers,

Fred
Fred Heida - 11 Apr 2006 04:57 GMT
Found it.. must make use of  IVsSimpleObjectList2 and  IVsSimpleLibrary2
interfaces..

Cheers,

Fred

> Hi All,
>
[quoted text clipped - 30 lines]
>
> Fred
Ed Dore [MSFT] - 12 Apr 2006 02:53 GMT
Hi Fred

That's the way to go. We should have the next version of the Visual Studio
SDK out shortly, and I recommend reviewing the IronPython integration
sample, as we use those same interfaces to display classes and methods from
that sample.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties and confers no rights.
Fred Heida - 12 Apr 2006 22:32 GMT
Thx Ed!,

Cheers,

Fred

> Hi Fred
>
[quoted text clipped - 7 lines]
>
> This post is '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.