How can we help you today? How can we help you today?
ebnf

Activity overview

Latest activity by ebnf

Exception when decompiling to C#
The following two methods cause an exception when decompiling to C#. Looking at the IL it seems that the "dup" instruction isn't handled properly.internal Expression Rewrite(Expression instance...
1 follower 1 comment 0 votes
Ah yes, the code should be as following: [SecurityCritical] internal static unsafe void SectionListFromPage(PtsContext ptsContext, IntPtr page, ref PTS.FSPAGEDETAILS pageDetails, out PTS.FSSECTIONDESCRIPTION[] arraySectionDesc) { int num; PTS.FSSECTIONDESCRIPTION[] fssectiondescriptionArray = arraySectionDesc = new PTS.FSSECTIONDESCRIPTION[pageDetails.u.complex.cSections]; if (fssectiondescriptionArray == null || fssectiondescriptionArray.Length == 0) { fixed (PTS.FSSECTIONDESCRIPTION* fssectiondescriptionRef = null) { PTS.Validate(PTS.FsQueryPageSectionList(ptsContext.Context, page, pageDetails.u.complex.cSections, fssectiondescriptionRef, out num)); } } else { fixed (PTS.FSSECTIONDESCRIPTION* fssectiondescriptionRef = fssectiondescriptionArray) { PTS.Validate(PTS.FsQueryPageSectionList(ptsContext.Context, page, pageDetails.u.complex.cSections, fssectiondescriptionRef, out num)); } } ErrorHandler.Assert(pageDetails.u.complex.cSections == num, ErrorHandler.PTSObjectsCountMismatch); } The existing generated code is still wrong because it gives a compile error because it is illegal to rebind the value of a fixed statement. / comments
Ah yes, the code should be as following:[SecurityCritical] internal static unsafe void SectionListFromPage(PtsContext ptsContext, IntPtr page, ref PTS.FSPAGEDETAILS pageDetails...
0 votes
'fixed' statements decompiled incorrectly
The following IL: .method assembly hidebysig static void SectionListFromPage(class MS.Internal.PtsHost.PtsContext ptsContext, native int page, valuetype MS.Internal.PtsHost.UnsafeNativeMethods....
2 followers 3 comments 0 votes