Search:
Namespaces
Discussions
.NET v1.1
Feedback
IMetaDataImport System.ExecutionEngineException problem
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework.clr
.
Post a new message to this list...
Sacha Faust
I've been defining the IMetaDataImport interface in C# and so far I got all
the Enum* method working.
I'm having a hard time with all the Get*Props methods like GetFieldProps,
GetParamProps ....
My issue is with the void const **ppValue parameters. I've tried many
solution to get theses calls to work and
it always fails on that parameter and I get an
System.
ExecutionEngineException
throwned. Anyone knows how to correctly
define and use this parameter? The Metadata Unmanaged API says that this
parameter is not required so I used a null and still gives an error. I know
it fails on this parameter because all the other vars are correctly set up
to that one.
Here is the definition for one of the call.
// STDMETHOD(GetFieldProps)(
// mdFieldDef mb, // The field for which to
get props.
// mdTypeDef *pClass, // Put field's class here.
// LPWSTR szField, // Put field's name here.
// ULONG cchField, // Size of szField buffer
in wide chars.
// ULONG *pchField, // Put actual size here
// DWORD *pdwAttr, // Put flags here.
// PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob
value of meta data
// ULONG *pcbSigBlob, // [OUT] actual size of
signature blob
// DWORD *pdwCPlusTypeFlag, // [OUT] flag for value
type. selected ELEMENT_TYPE_*
// void const **ppValue, // [OUT] constant value
// ULONG *pcchValue) PURE;
Reply to this message...
Ben Schwehn
[Original message clipped]
what makes you so sure? I bet it's not this parameter.
Post cour c# code!
btw the method signature you gave for GetFieldProps is slightly
inconsistent in the comments (i know this is how it's defined in cor.h)
params 2,3,5,6 are out params as well
--
Ben
http://bschwehn.de
Reply to this message...
Mattias Sjögren
>Anyone knows how to correctly define and use this parameter?
If you want the value, declare it as out
IntPtr
.
If not, declare it as an
IntPtr
passed by value and pass in
IntPtr
.Zero.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
|
http://www.dotnetinterop.com
Please reply only to the newsgroup.
Reply to this message...
System.ExecutionEngineException
System.IntPtr
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com