# Could not load agent module for Dynatrace OneAgent SDK for C/C++

**URL:** <https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737>\
**Category:** Open Q&A\
**Tags:** oneagent-sdk\
**Created:** [July 3, 2020, 9:00am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737 "2020-07-03T09:00:54Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 3, 2020, 9:00am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/1 "2020-07-03T09:00:54Z")

</div>

Getting the Error: Could not load agent module for Dynatrace OneAgent SDK for C/C++: the specified module was not found

when trying to run the sample1.exe (OneAgent SDK for C/C++) on windows.

OneAgent is running and I can’t find out what the problem is.

Thanks for the help in advance.

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 3, 2020, 9:44am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/2 "2020-07-03T09:44:59Z")

</div>

Hi,

did you follow the recommended troubleshooting steps?

> **[GitHub - Dynatrace/OneAgent-SDK-for-C: Enables custom tracing of native applications in...](https://github.com/Dynatrace/OneAgent-SDK-for-c#troubleshooting)**
>
> Enables custom tracing of native applications in Dynatrace

Please provide the console output for more information.

---

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 6, 2020, 7:36am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/3 "2020-07-06T07:36:35Z")

</div>

Yes

> _2020-07-06 07:13:06.184 UTC [00000620] info [onesdk] Initializing Dynatrace OneAgent SDK for C/C++ …_

> _2020-07-06 07:13:06.200 UTC [00000620] info [onesdk] SDK stub version 1.5.1.4, build date 2019.10.23 12:58:09._

> _2020-07-06 07:13:06.209 UTC [00000620] fine [onesdk] Preparing arguments…_

> _2020-07-06 07:13:06.213 UTC [00000620] config [onesdk] Options:_

> _2020-07-06 07:13:06.218 UTC [00000620] config [onesdk] Agent active: true_

> _2020-07-06 07:13:06.222 UTC [00000620] config [onesdk] Agent module: ‘oneagentloader.dll’_

> _2020-07-06 07:13:06.226 UTC [00000620] config [onesdk] SDK log level: finest_

> _2020-07-06 07:13:06.230 UTC [00000620] config [onesdk] Additional options:_

> _2020-07-06 07:13:06.235 UTC [00000620] config [onesdk] ONESDK\_INTERNAL\_CA627667445C40F0\_INIT\_FLAGS=0_

> _2020-07-06 07:13:06.240 UTC [00000620] fine [onesdk] Loading agent module…_

> _2020-07-06 07:13:06.280 UTC [00000620] info [onesdk] Could not load agent module for Dynatrace OneAgent SDK for C/C++: The specified module was not found_

> _ONESDK initialized: no initialize: The specified module was not found_

> _agent\_set\_warning\_callback: Not initialized._

> _agent\_set\_verbose\_callback: Not initialized._

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 7, 2020, 5:44am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/4 "2020-07-07T05:44:27Z")

</div>

Hi,

I cannot see any suspicious in these log lines. Here are a couple of ideas and questions:

- The log message looks like OneAgent was not installed. Could you verify that the installation works:
  - oneagentproc.dll must be loaded into the process (this can be verified with [Process Explorer](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer))
  - oneagentloader.dll and oneagentsdk.dll must exist on your machine.

- A reboot after OneAgent installation might be required
- Is the application running with a debugger attached (from within Visual Studio)?
  - If yes, please try running it as a Release build outside Visual Studio

---

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 7, 2020, 7:07am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/5 "2020-07-07T07:07:02Z")

</div>

They exist and work

Didn’t work, getting the same output

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 7, 2020, 7:08am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/6 "2020-07-07T07:08:51Z")

</div>

Do you see oneagentproc.dll being loaded into the process?

---

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 13, 2020, 1:27pm UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/7 "2020-07-13T13:27:48Z")

</div>

There are some exe calling oneagentproc\_27632.dll

but not the Dynatrace-OneAgent-Windows-1.193.170.exe

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 14, 2020, 5:33am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/8 "2020-07-14T05:33:06Z")

</div>

The application using the C++ SDK must have oneagentproc.dll loaded at runtime. Can you verify that please?

---

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 14, 2020, 9:55am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/9 "2020-07-14T09:55:50Z")

</div>

Yes it is

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 14, 2020, 11:31am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/10 "2020-07-14T11:31:31Z")

</div>

Are any other Dynatrace DLLs loaded into this process?

---

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 14, 2020, 7:41pm UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/11 "2020-07-14T19:41:23Z")

</div>

No there are not

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 16, 2020, 7:47am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/12 "2020-07-16T07:47:27Z")

</div>

Hi,  
could please attach a screenshot of process explorer where we see the list of loaded DLLs - sorted by “Company Name” (so we see everything by Dynatrace) and displaying the DLL version information?

---

<div class="post-metadata">

**Author:** ![sebastian\_dedin](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sebastian\_dedin](https://community.dynatrace.com/u/sebastian_dedin)\
**Post date:** [July 17, 2020, 5:32am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/13 "2020-07-17T05:32:20Z")

</div>

Hi

this are the dynatrace dlls loaded by sample1.exe

oneagentproc version:1.195.146.90

 ![25767-unbenannt.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/7/c7c03913253bf7c3387ac3fc2b592ce9eae28a35.png)

---

<div class="post-metadata">

**Author:** ![wolfgangziegler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgangziegler/32/31955_2.png) [@wolfgangziegler](https://community.dynatrace.com/u/wolfgangziegler)\
**Post date:** [July 17, 2020, 7:06am UTC](https://community.dynatrace.com/t/could-not-load-agent-module-for-dynatrace-oneagent-sdk-for-c-c/19737/14 "2020-07-17T07:06:21Z")

</div>

Thanks,

that was really helpful!

A potential problem could be this “Digital Guardian Agent” that is also present in the process. Multiple agent technologies within a process has caused similar issues in the past. I suggest disabling this other agent (if possible) and see if the problem persists. In any case, you might want to open a support case with us so we can collect logs and additional data about the possible conflict between those agent technologies.
