On Sat, 29 Apr 2023 19:26:00 GMT, Julian Waters <jwat...@openjdk.org> wrote:

> In windowsaccessbridge(-64).dll the following methods are exported in a def 
> file to C API which in turn call their real implementation, which are 
> instance methods of the class WinAccessBridge:
> 
> addJavaEventNotification
> removeJavaEventNotification
> addAccessibilityEventNotification
> removeAccessibilityEventNotification
> 
> 
> However, they are nowhere to be seen in the actual C interface, in 
> AccessBridgeWindowsEntryPoints.cpp. Your guess is as good as mine as to how 
> on earth MSVC is still capable of compiling and linking this without any 
> errors whatsoever, but in any case, this is a severe oversight and should be 
> properly defined in the C API lest this happy accident within MSVC is fixed 
> by Microsoft in the future

I should think so, it doesn't make sense to export a function that doesn't even 
exist at all. And to make matters worse Microsoft Visual C still does export 
functions with those names (you can easily verify this with dumpbin) which is 
even more confusing. It may be a cursed Microsoft extension that has simply 
gone under the radar, and is somehow exporting the C++ class instance methods 
as static, or even exporting dummy functions, neither of which is what we want 
it to do!

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13734#issuecomment-1533020156

Reply via email to