What is __FnPtr
from System.Data
?
#2433
-
I'm trying to debug System.Data and so I've decompiled it to a project, but I cannot build it because of num1 = __calli((__FnPtr<int (IntPtr, _GUID*, void**)>) *(long*) *(long*) pointer2)((void**) iunknownPtr, (_GUID*) ref local1, (IntPtr) ref local2); causes
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Are you sure you were using ILSpy for that decompilation? If so, which version?
Current ILSpy versions produce the following output for that line in NativeOledbWrapper:
Note that System.Data seems to have been originally written in C++/CLI, so it won't be possible to perfectly decompile it to C#. |
Beta Was this translation helpful? Give feedback.
Are you sure you were using ILSpy for that decompilation? If so, which version?
calli
andFnPtr
refers to function pointers. This has always existed in IL code for Managed C++, but C# only recently (in C# 9) got support for this feature. Current ILSpy versions support the C# 9 feature. Other decompilers that don't support C# 9 might have invented their own non-standard syntax to represent this .NET feature. But your code doesn't look like anything ILSpy would generate, so I suspect you used a different decompiler?Current ILSpy versions produce the following output for that line in NativeOledbWrapper: