在 2025-5-31 00:43, Pali Rohár 写道:
Also these cleanups are important:
e0a38b59e92dc7fd568c983a20d71ecf71688aa9
5a28a0560c350f9563e072eb55929b417c86bb53

We can teach gendef to "comment" DllRegisterServer, DllUnregisterServer,
DllCanUnloadNow, DllGetClassObject, DllEntryPoint and DllMain symbols.

Maybe there are even more symbols which should not be in the import
library.

Here's a list of symbols that are exported from Windows SDK libs. They need be either commented out or marked `PRIVATE`.

```
const PRIVATE_EXPORTS = [
  'DllGetClassObject',
  'DllGetClassObjectWOW',
  'DllCanUnloadNow',
  'DllRegisterServer',
  'DllRegisterProxy',
  'DllRegisterWindowClasses',
  'DllUnregisterServer',
  'DllUnregisterServerWeReallyMeanIt',  // ?? what does this damn thing do?
  'DllUnregisterProxy',
  '_DllEntryPoint',
  '_DllMainCRTStartup',   // MSVC entry point
  '_DllMainCRTStartupForGS',
  '_DllMainCRTStartupForGS2',
  'DllMain',
  'DllMainCRTStartup',  // MinGW entry point
  'DllGetVersion',
  'DllDebugObjectRPCHook',
];
```

There are also symbols that are apparently not to be imported, such as `DllRegisterServerEx{A,W,}`, and all names that begin with `IID_` or `LIBID_`.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to