Как обновить C++ dll, не будучи должен повторно связать exe с библиотечным файлом?

Я не полагаю, что это возможно со встроенной функциональностью Bash.

Вы можете получать уведомление, когда ребенок выходит:

#!/bin/sh
set -o monitor        # enable script job control
trap 'echo "child died"' CHLD

Однако нет никакого очевидного способа получить статус выхода ребенка в обработчике сигналов.

Получение того дочернего состояния обычно является заданием wait семья функций в более низких API POSIX уровня. К сожалению, поддержка Bash этого ограничена - можно ожидать один определенный дочерний процесс (и получить его статус выхода), или можно ожидать весь из них, и всегда получать 0 результатов.

то, Что кажется невозможным сделать, является эквивалентом waitpid(-1), какие блоки до любой дочерний процесс возвращает.

8
задан Rich 30 July 2009 в 17:12
поделиться

4 ответа

If you export the functions from using a DEF file and manually specify the ordinals, you should be able to accomplish this.

Reference

http://msdn.microsoft.com/en-us/library/d91k01sh(VS.80).aspx

8
ответ дан 5 December 2019 в 10:43
поделиться

As long as you don't add any exported symbols, the ordinals won't change. If you add exported symbols through the standard dllexport mechanism, then that's going to be difficult to control. If you use the old style .xpf symbol file you might be able to control the ordering of the symbols in the lib (although I don't know this for sure - it might still reorder them however it likes), but it's tricky to do C++ symbols this way.

0
ответ дан 5 December 2019 в 10:43
поделиться

I think that ordinals are rarely used to resolve DLL imports anymore - I think that you have to use .def files to get the linker to use them. So as long as you don't change names or signatures of the exported functions, the .exe should work just fine.

0
ответ дан 5 December 2019 в 10:43
поделиться

It depends on how your EXE used the classes from the DLL. Adding new classes should not affect existing entrypoints. Aside from that, however, any the following will affect object size and/or layout, and as such will be a client-breaking change (note that this is technically VC-specific, but most of these apply to any sane implementation):

  • Removing fields (even private) from classes
  • Adding new fields (even private) to classes
  • Adding new base classes to existing classes
  • Removing base classes from existing classes
  • Adding new virtual method before an existing virtual method (adding new virtual methods after existing ones is okay, except for the case described in next point)
  • Adding a new virtual method in a class that is used as base class by another class in the same DLL which also has virtual methods
  • Changing type of existing fields
  • Changing signature of existing methods
  • Making a virtual method non-virtual, and vice versa
8
ответ дан 5 December 2019 в 10:43
поделиться
Другие вопросы по тегам:

Похожие вопросы: