Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Runtime Callable Wrapper problem

$
0
0

I have a .net 4.8 class library project which refers an old RCW (dll).
Then I add a 4.8 Console program referring my class library.
This crashes when calls through the RCW is done, error message is FatalExecutionEngineError.
My class library is setup with Any CPU build (Prefer 32-bit is not selected).

If I change the class library to x86 or select Prefer 32-bit all is ok, but that mens of course that all assemblies using the class library (in this case the console program) also have to be setup to compile to 32-bits, which will be a PITA.

The actual comobject is an out-of-process server which is compiler as 32 bit code, but if I skip the RCW by (re)defining the interfaces in my own code (using the published GUIDs of course), then all is ok also with 64 bits compilation (x64 setting), but it would be a lot of work to "clone" the RCW (RCW source code is not available).

The strange thing is that if I run corflags.exe (version 4.8.3928.0) on the RCW it shows:

Version      : v2.0.50727
CLR Header: 2.5
PE             : PE32
CorFlags    : 0x9
ILONLY      : 1
32BITREQ  : 0
32BITPREF : 0
Signed       : 1

Doesn't this indicate that the RCW is callable from a 64 bits assembly ?


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>