DLL 中的 EOutOfResources
EOutOfResources in DLL
我将几个 DLL 和一个应用程序从 Embarcadero C++ Builder XE 迁移到 C++ Builder 10.1 Berlin。
现在当我的 DLL(包含表单)被应用程序加载时,我得到
EOutofResources "Das angegebene übergeordnete Element ist kein übergeordnetes Element von '%s'"
在TApplication::CreateHandle
找了好几个小时,没有发现同样的错误,连英文翻译都没有。我会把它翻译成 "The specified parent element is not a parent element of '%s'".
我的堆栈跟踪:
当我在我的 DLL 代码中设置断点时,none 被触发,所以我不确定为什么甚至会调用 TApplication 构造函数(我的代码中有一个,但它没有好像叫)。
我怀疑依赖项存在问题,所以我使用了依赖项 walker,它发现了两个 64 位 dll。不确定这是否是误报:
我可以做些什么来进一步解决或诊断这个问题?
我尝试启动一个新的 VCL 类型项目以查看项目设置是否存在差异,你瞧:
<PropertyGroup>
<ProjectGuid>{E8815773-6421-4FB8-A109-F4F505A67A2E}</ProjectGuid>
<ProjectVersion>18.2</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<AppType>Application</AppType>
<MainSource>Project1.cpp</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
</PropertyGroup>
新创建的项目有一个元素 FrameworkType
设置为 VCL
。我迁移的项目将此设置为 None
。将其更改为 VCL
后,错误消失了。
我将几个 DLL 和一个应用程序从 Embarcadero C++ Builder XE 迁移到 C++ Builder 10.1 Berlin。
现在当我的 DLL(包含表单)被应用程序加载时,我得到
EOutofResources "Das angegebene übergeordnete Element ist kein übergeordnetes Element von '%s'"
在TApplication::CreateHandle
找了好几个小时,没有发现同样的错误,连英文翻译都没有。我会把它翻译成 "The specified parent element is not a parent element of '%s'".
我的堆栈跟踪:
当我在我的 DLL 代码中设置断点时,none 被触发,所以我不确定为什么甚至会调用 TApplication 构造函数(我的代码中有一个,但它没有好像叫)。
我怀疑依赖项存在问题,所以我使用了依赖项 walker,它发现了两个 64 位 dll。不确定这是否是误报:
我可以做些什么来进一步解决或诊断这个问题?
我尝试启动一个新的 VCL 类型项目以查看项目设置是否存在差异,你瞧:
<PropertyGroup>
<ProjectGuid>{E8815773-6421-4FB8-A109-F4F505A67A2E}</ProjectGuid>
<ProjectVersion>18.2</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<AppType>Application</AppType>
<MainSource>Project1.cpp</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
</PropertyGroup>
新创建的项目有一个元素 FrameworkType
设置为 VCL
。我迁移的项目将此设置为 None
。将其更改为 VCL
后,错误消失了。