.NETGURU
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...
 
    
Dot Net Guruias 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.

Dot Net Guruias

--
Dot Net Guruias 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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification