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.