M
M
Maxim Chistov2015-03-10 11:08:07
.NET
Maxim Chistov, 2015-03-10 11:08:07

How to use resource win dll without WinAPI in C#?

There is an application for Windows in C#. It needs to be ported to other operating systems (iOS/Android/WP/Linux/OS X), but there is one problem - it stores data in resource dlls (unmanaged), all work with which is done using WinAPI functions (LoadLibrary(...) ,FindResource(...) and so on) Obviously, it is impossible to transfer the code in this form, because .NET runtimes for other platforms definitely do not have this functionality. But in fact, these dlls are just data files. Maybe someone knows how to work with them without WinAPI? Some library or something...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CookieMonster, 2015-03-10
@grigorylug

if the application is built correctly, i.e. corresponds to development practices such as solid, dry, kiss and common sense in general, then a separate abstraction should be responsible for saving data to resources, so I don’t see any problems on other platforms to define this abstraction differently, and store it in any convenient way - in xml , binary form, database or on a remote server.

D
Daniil Basmanov, 2015-03-10
@BasmanovDaniil

https://msdn.microsoft.com/en-us/library/aa984739.aspx
You can write a wrapper using DllImport , but you still most likely have to compile the library for the target platform.

A
Alexey, 2015-03-10
@rdifb0

As for me, it's easier to extract data from dll and save it in a more cross-platform form. Which one to start with and the type of resources that are stored there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question