是否有可以包含资源的受支持文件类型的列表? [英] Is there a list of supported file types which can contain resources?

查看:54
本文介绍了是否有可以包含资源的受支持文件类型的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找可以包含资源并且可以由 LoadLibrary LoadModule

I'm looking for a list of file types which can contain resources and can be loaded by LoadLibrary or LoadModule function.

我想使用 LoadResource 函数,其中第一个参数是模块的句柄,而我d想知道支持哪些文件类型(可能包含资源,并且可以由 LoadLibrary <罢工> LoadModule 函数)。

I want to load resources using LoadResource function where the first parameter is the handle to a module and I'd like to know what file types are supported (may contain resources and can be loaded by the LoadLibrary or LoadModule function).

脚注:

我正在研究具有资源支持的翻译工具,我需要此工具来打开文件对话框过滤器。

Footnote:
I'm working on a translation tool with resource support and I need this for file open dialog filter.

谢谢

推荐答案


我正在寻找可以包含资源并且可以由LoadLibrary和LoadModule函数加载的文件类型列表。

I'm looking for a list of file types which can contain resources and can be loaded by LoadLibrary and LoadModule functions.

您不应使用 LoadModule ,这是为了与16位应用程序兼容。 LoadLibrary 通常用于加载库:可执行文件和DLL符合要求。由于您需要文件打开对话框的信息,因此我认为您对适用的文件扩展名最感兴趣。不幸的是,这并不容易,因为EXE和DLL不一定需要具有EXE和DLL扩展名。例如, SCR 扩展名是屏幕保护程序的常用扩展名,但实际文件是平面EXE。 BPL 是Delphi编译包的扩展,但实际上这些文件实际上是 DLL LoadLibrary

You should not use LoadModule, it's for compatibility with 16 bits application. LoadLibrary is used to, well, load libraries: Executables and DLL's fit the bill. Since you want the information for your File Open dialog, I assume you're mostly interested in applicable file extensions. Unfortunately that's not easy, because EXE's and DLL's don't necessarily need to have the EXE and DLL extensions. For example the SCR extension is a popular extension for screen savers, but the actual file is a plane EXE. BPL is the extensions of Delphi's compiled packages, but those files are actually DLL's as far as LoadLibrary is concerned.

在我看来,您应该仅对EXE和DLL进行过滤,但让用户打开所需的内容。如果 LoadLibrary 失败,您只会知道它是否与 LoadLibrary 真正兼容。

In my opinion you should simply filter on EXE and DLL, but let the user open whatever they want. You'll only know if it's truly compatible with LoadLibrary if LoadLibrary fails or not.

这篇关于是否有可以包含资源的受支持文件类型的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆