如何使用 WinCE 5.0 RTOS 在 ATL 应用程序中加载第三方 .dll (COM DLL)?

发布于 2024-11-01 07:15:10 字数 557 浏览 1 评论 0原文

我得到了答案,需要了解以下内容:

我有一个 WinCe 5.0 ATL 应用程序。此应用程序使用第三方 COM dll 和第 3 方应用程序(.exe)。根据我对 WinCE 和 Dll 加载的理解如下:

WinCE:

所有 dll 导出函数应写入“.Def”文件和 dll 中需要在运行时包含的图像进程应该存在于“.bib”文件中。并且应该调用DLLExport或loadlibrary(我不想深入讨论如何使用这些)来加载DLL。

但就我而言:没有与第三方dll相关的.def文件,并且存在.bib文件,但是,.dll的路径在文件中被注释(我的代码正在成功构建,我能够使运行时图像)。

除了这个附加文件之外,我还得到了:即 .cfg(我认为是配置文件),其中写着“SERVICE name.dll(例如,这是第 3 方 dll 名称)”。我能够使用“Dll Export Viewer(免费工具)”查看导出函数,但无法从应用程序中找到导出函数的使用(调用)。

我可以编写 .cfg 文件并包含应用程序将使用的 dll 吗?任何人都可以帮助我理解所有这些吗?

提前致谢...


I got the answer and need to understand the following :

I have a WinCe 5.0 ATL application. This application is using third party COM dll and 3rd party application(.exe).As per my understanding on WinCE and Dll loading is as following:

WinCE:

All the dll exported functions should be written in ".Def" file and the dll that need to included during runtime image process should be there in ".bib" file.And one should call DLLExport or loadlibrary (i do not want to go into deep how to use these), to load the DLL.

But in My case: There is no .def file related to the third party dll and .bib file is there, but, the path of the .dll is commented in the file(My code is building successfully and i'm able to make runtime image).

Along with this one more additional file i got : That is, .cfg (i think configuration file) and in that it is written "SERVICE name.dll (for example, this is the 3rd party dll name)".I'm able to see the exported function by using "Dll Export Viewer (a free tool)" but not able to find the use of (calling of) the exported functions from the application.

Can i write .cfg file and include the dll that will be used by application? Can any one pls help me to understand all these??

Thanks in Advance...


如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞美少年 2024-11-08 07:15:10

我不是 100% 确定我理解这个问题,所以我将解释一下我认为您要问的内容:

  • 您有一个 ATL 应用程序和一个为 Windows CE 构建的 COM 库。
  • 这些项目是由第三方提供的,因此您没有源代码
  • 您想将这些项目直接集成到CE OS构建中

如果我的理解是正确的,那么答案是:

是的,您可以这样做。您需要做的是:

  1. 将二进制文件(EXE 和 DLL)添加到操作系统映像中。这是通过将它们添加到 BIB 文件(PLATFORM.BIB 或 PROJECT.BIB)中来完成的。它们可以位于 MODULES 或 FILES 部分。
  2. 通过将注册表项添加到 REG 文件(PLATFORM.REG 或 PROJECT.REG)中,将 COM 对象所需的注册表项添加到平台中。

如果您没有 #2 的条目,请执行以下操作:

  1. 使用远程注册表编辑器导出未安装 COM 库的设备的整个注册表
  2. 将 COM 对象放入该设备
  3. 调用COM 对象上的 DllRegisterServer 入口点(regsvrce 或其他)
  4. 使用远程注册表编辑器再次导出设备的整个注册表
  5. 比较两个 reg 文件。新条目是您需要放入 REG 文件中的条目

I'm not 100% certain I understand the question, so I'll paraphrase what I think you're asking:

  • You have an ATL application and a COM library that it uses built for Windows CE.
  • These items are provided by a third-party, so you don't have source code
  • You want to integrate these items directly into a CE OS build

If my understanding is correct, then the answer is:

Yes, you can do this. What you need to do is:

  1. Add the binary files (EXE and DLL) to the OS image. This is done by adding them to your BIB file (PLATFORM.BIB or PROJECT.BIB). They could be in either the MODULES or FILES section.
  2. Add the requisite registry entries for the COM objects to the platform by adding the entries into your REG file (PLATFORM.REG or PROJECT.REG).

If you don't have the entries for #2, then do the following:

  1. Use Remote Registry Editor to export the entire registry for a device without your COM library installed
  2. Put the COM object onto that device
  3. Call the DllRegisterServer entry point on the COM object (regsvrce or however)
  4. Use Remote Registry Editor to export the entire registry for the device again
  5. Diff the two reg files. The new entries are the ones you need to put in your REG file
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文