I have a C# dll generated from a .resx file (I believe it's called a satellite dll). This stores simple key to string mappings (used for language localization). I was wondering if it's possible and feasible to access the information stored in the C# dll from a C++ unmanaged code base?

I'd imagine I would need to access some method that performs the key to string match from the dll but I've failed to find information about this method. The best I've managed to uncover is using the resx file directly with the help of a ResourceReader in C++ but I'd prefer to avoid this.

Thank you for your time and assistance :)

Recommended Answers

All 2 Replies

Can you turn on the /clr switch in the C++ compiler, then add the DLL as a reference?
You would then reference the namespace in the C++ code with "using namespace {name_goes_here};"

If you can (and do), you will probably need to change the default character set from Unicode to MultiByte.

Otherwise, you could start with information like this and possibly be able to get to the resources:
or the library exporter:

Thank you for your reply Thines :)

I used ILSpy and there doesn't seem to be a namespace exposed in the managed resource dll. It contains a binary .resource file that, I presume, the managed Resource Manager is happy to use.

Ultimately it doesn't seem feasible to use the managed dll in an unmanaged code base.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.