cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Error "Unable to load DLL twApi.dll" received unexpectedly during run

ClaudiaTDE
4-Participant

Error "Unable to load DLL twApi.dll" received unexpectedly during run

Dear Community!

 

For one project we use the Thingworx Edge SDK for C#. Most of the time we are able to transfer data from our C# application to the cloud. But sometimes, during the application run, we unexpectedly get the following error message:

 

System.DllNotFoundException: Unable to load DLL 'twApi.dll': Attempt to access invalid address. (Exception from HRESULT: 0x800701E7)
at com.thingworx.communications.client.TwApiWrapper.twW_SetLoggerProperties(TwApiLogLevel level, Byte isVerboseEnabled, TwLogMessageDelegate onLogMessage)
at com.thingworx.communications.client.TwApiWrapper.ConfigureTwApiLogger()
at com.thingworx.communications.client.TwApiWrapper.Initialize(ClientConfigurator config)
at com.thingworx.communications.client.BaseClient.initialize()
at com.thingworx.communications.client.BaseClient..ctor(ClientConfigurator config)
at com.thingworx.communications.client.ConnectedThingClient..ctor(ClientConfigurator config)
at My.Project.Class.Communication.ThingworxClient..ctor(ClientConfigurator config)

 

 

The error message seems strange since the *.dll files always live in the output directory under tw/x86/ (we only use 32 bit) and sometimes even worked for hours until the error occures for the first time. I highly appreciate any hint and feedback regarding this issue.

 

Thank you very much!

1 REPLY 1
ClaudiaTDE
4-Participant
(To:ClaudiaTDE)

Update:

 

One workaround we recently found (which is still unreliable) is uninstalling our application (through programs and features) and removing any Visual C++ redistributable packages larger than 2008, and then rebooting the system. After reinstalling the application, it will work for an indefinite period of time.

 

We still appreciate any solution for this problem!

Thank you very much!

 

Top Tags