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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

twapi.dll not found at path

hhansen
2-Explorer

twapi.dll not found at path

Hello!

First time poster here - hope you'll be able to help me out.  I've added some Thingworx functionality to our Windows .Net application via the SDK.  It's up and running and sending information back to our mashup and most things are working as they should.

One thing that is puzzling me is that I get an error message (via a trace listener) whenever I launch the application by double clicking on an associated file that is located elsewhere in the file system.  So: Normal launch means no error message - double click on associated file which in turns bring up our application gives this output in the trace:

[L: Critical] [T: 1] [U: libu] [O: com.thingworx.communications.client.TwApiWrapper] Initializaion warning: the core library was not found at path [C:\<application install directory>\Bin\tw\x86\twApi.dll]


Which is odd, as we distributed the twApi.dll directly under \Bin.  The tw\x86 part of the path looks like the distribution from PTC, however.  I'm at a bit of a loss here to why it looks for twapi.dll in different places depending on how we start the application.  Any feedback is welcome, thanks.

3 REPLIES 3
ytella
17-Peridot
(To:hhansen)

hhansen
2-Explorer
(To:ytella)

Thanks for the reply, but it's not really a solution.  The thing is, twapi.dll loads normally when starting our application by directly running the executable (like from the menu, clicking on an icon etc).  Then it's able to locate the dll where we've put it.  It's when we start by double clicking on an associated file somewhere else the problem appears and it seems like it expect the tw\x86 path.


hhansen
2-Explorer
(To:hhansen)

Hmm, seems like I can't reproduce the "works as intended" scenario here.  Now it can't find twapi.dll directly under bin in any circumstance.  So either I'm an idiot or something changed.

So my questions is rather "why does it demand the "tw/x86" path for the DLL all the time?  Shouldn't it be happy with twapi.dll just living in the same directory as the executable?

Announcements


Top Tags