0

I built an application that uses TMS Components. I wrap and compile TTMSFNCWebBrowser into a core BPL that my application uses. I just updated the TMC Components, and then recompiled all my code (BPLs and EXEs). Now when I run my application, I get this runtime error:

Entry Point Not Found

The procedure entry point @Vcl@Tmsfncwebbrowser@TTMSFNCCustomWebBrowser@DoDevToolsMethodCompleted$qqr20System@UnicodeStringt1 could not be located in the dynamic link library Core.bpl.

The method DoDevToolsMethodComplete() is defined in the TMS code as protected virtual. So the method is defined, and is being exported (because it is not private). If I override that method, my code compiles, but still throws the same error at runtime.

What is the $qqr20System@UnicodeStringt1 that is at the end of the method name in the error message? I remember seeing it at other times, but I don't know what it means, nor how to fix the issue with the missing entry point.

I have looked for old VCL.TMSFNCWebBrowser.dcu files on my computer. There are none, only the new DCU that was complied during the update/install of the new TMS Components.

Does anyone have any experience troubleshooting this type of thing?

(I'm using RAD Studio XE 11.1 Update 1 and TMS FNC WX Pack 1.6.0.0)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
James L.
  • 9,384
  • 5
  • 38
  • 77
  • It's a mangled name. Clearly your linking / building is wrong. Why are you even using packages? Do you need to? – David Heffernan Jul 12 '23 at 07:53
  • @DavidHeffernan - The application is very large and is segmented into several BPL files. It's been an effective model in this application for 13+ years. – James L. Jul 12 '23 at 15:32
  • @JamesL. The mangled name means the `DoDevToolsMethodComplete()` method that is being linked to is expected to take in (or return, I forget which) a `UnicodeString` value, but the actual method being found is not doing that. Which likely means the method signature has changed (you did say you updated TMS) and either 1) your code hasn't been updated to use the new method, or 2) there is older code floating around that is interfering with your compiles. – Remy Lebeau Jul 12 '23 at 19:02
  • The declaration for the method in the TMS code is: `procedure DoDevToolsMethodCompleted(AEventName: string; AJSONResponse: string); virtual;`. So it appears there are two `UnicodeString` params, and no return value. So what does `qqr20System` mean? – James L. Jul 12 '23 at 19:05
  • I found the source of my issue. My app was loading an older version of TMSFNCCorePkgDXE14.bpl, where `DoDevToolsMethodCompleted()` had one param, now it has two. After updating the TMS BPL, everything works correctly again. – James L. Jul 12 '23 at 22:38

1 Answers1

2

What is the $qqr20System@UnicodeStringt1 that is at the end of the method name in the error message?

See Delphi - unmangle names in BPL's.

@ separates nested identifiers, so:

  • @Vcl@Tmsfncwebbrowser@TTMSFNCCustomWebBrowser@DoDevToolsMethodCompleted refers to Vcl.Tmsfncwebbrowser.TTMSFNCCustomWebBrowser.DoDevToolsMethodCompleted
  • System@UnicodeString refers to System.UnicodeString

$ ends the function name and separates it from its parameter info.

qqr refers to the calling convention, in this case Delphi's default register convention.

20 is the length of the identifier that follows it, System@UnicodeString, ie the type of the 1st parameter.

I don't know what t1 refers to.

Here is an old article on EDN that explains how Delphi's name mangling works (it may not be up to date with the latest compiler versions, for instance Generics, etc):

Original German:
Unter der Lupe: Delphi packages (Wayback)

English translation:
Under the magnifying glass: Delphi packages

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Thank you! This is very helpful. And I found the source of my issue. My app was loading an older version of TMSFNCCorePkgDXE14.bpl, where `DoDevToolsMethodCompleted()` had one param, now it has two. After updating the TMS BPL, everything works correctly again. Thanks for your comments and answer. They helped me narrow down the issue a lot. – James L. Jul 12 '23 at 22:37