64bit windows 7, TC08 Console App: dll not found x2

Post your .Net discussions here
Post Reply
j0nny
Newbie
Posts: 1
Joined: Mon Sep 19, 2016 2:31 am

64bit windows 7, TC08 Console App: dll not found x2

Post by j0nny »

Hi,
thanks for a great SDK. This is to help any other folks who run across these issues.
Background:
I had the 32-bit SDK for TC08 console app working on my windows 7 sp1 32-bit laptop.
The laptop performance on 32bit windows 7 was so abysmal I updated to 64bit windows 7 which is much more usable.
Foreground:
Downloaded and installed the SDK and fired up the USBTC08CSConsole app in VS2015 enterprise.
It started up with an error about not being able to find the TC08 DLL dll:

System.DllNotFoundException was unhandled
HResult=-2146233052
Message=Unable to load DLL 'usbtc08.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=TC08example

This despite the path being good to the DLL, in fact right up front:
C:\Users\jonny>echo %path%
C:\Program Files\Pico Technology\SDK\lib\;C:\Windows\system32;C:\Windows;...

Since it wanted to ignore path I fixed that by putting the full path in USBTC08Imports.cs

private const string _DRIVER_FILENAME = "C:\\Program Files\\Pico Technology\\SDK\\lib\\usbtc08.dll";

Now it starts up OK and gives info when 'I' is pressed but when 'G' is pressed gives one line of temps then crashes not being able to find crtdll.dll in the while loop of unsafe void GetValues():

System.DllNotFoundException was unhandled
HResult=-2146233052
Message=Unable to load DLL 'crtdll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=TC08example

Tried to find that DLL and fodn a copy in sysWOW64 but it would not register when I tried so
rather than continue to try to figure out why that DLL was missing I updated the code from
while (Win32Interop._kbhit() == 0);
to the more C# friendly
while (!Console.KeyAvailable);

This is to help other folks who may have these issues.
I do not intend a criticism of PICO code. As a developer myself I am all too aware of the challenges of keeping updated and updating legacy code and especially across such a wide breadth. My hat is off to you folks for all you have done. Thanks.

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: 64bit windows 7, TC08 Console App: dll not found x2

Post by Martyn »

Thank you for the information :)
Martyn
Technical Support Manager

Post Reply