Can I embed other files in a DLL?

前端 未结 4 1891
轮回少年
轮回少年 2020-12-16 15:09

I\'m writing a plug-in for another application through an API. The plug-ins are distributed a DLLs. Is it possible to embed other files in the DLL file like pdfs, images, ch

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-16 15:33

    Yes, you can do that.

    Add a resource file to your project. Open the resource file in Visual Studio and click Insert Resource. You can select different types of resources, including external files.

    Visual Studio will generate code for you so that you can retrieve the files as byte arrays at run time from their names through the Resources identifier.

提交回复
热议问题