Patrick H. avatar image
Patrick H. Posted ·

How to instrument VB6 with the ADK

Part of an monitored applicatoin at a client is written in Visual Basic 6, the other parts are Web- and .Net Servers. We want to instrument the VB6 part with the ADK, but struggle doing so.

The initialization works with the following line:

Private Declare Function VB_dTInitialize Lib "dtadk.dll" (ByVal inManagerRef As Integer, ByVal outManagerRef As String) As Integer

We see that the agent is connected in the Agent Overview after that.

Now we want to place sensors to continue the Pure Path started at the web server. The DYNATRACE_AUTO_NODE and other Methdos mentioned in the Documentation are Macros and thus are not usable in the VB6 code.

Could someone give me a hint on how to retrieve the ID of the current PurePath and how to link them so they continue on the VB6 side?

1 comment
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hi Patrick,

There's a sample project at:

which does exactly what want to achieve, namely to use the ADK's C-API calls directly instead of the C/C++ macros, thus having direct access to pathIDs, methodIDs, etc.. Please have a look.

Best regards, Bernhard

0 Likes 0 · ·



Patrick.Hofmann@amasol.de1 contributed to this article