Can't Load the PCAN-UDS.dll
-
- Posts: 6
- Joined: Wed 19. Dec 2018, 03:29
Can't Load the PCAN-UDS.dll
Using a PCAN-USB-FD and have created a simple application using PCANBasic. Able to initialize a channel and use basic functions.
Tried to build a similarly simple app using PCAN-UDS.dll and the debugger says it cannot find PCAN-UDS.dll. I have all 3 dll files (Basic, ISO, and UDS) on my 64-bit Windows computer stored in the C:Windows\System32 folder, and I copied the 64-bit versions of each DLL.
I'm using Visual Studio 2017 and C#.
Any ideas why I can't seem to be able to load the PCAN-UDS.dll from my app?
Thanks.
Tried to build a similarly simple app using PCAN-UDS.dll and the debugger says it cannot find PCAN-UDS.dll. I have all 3 dll files (Basic, ISO, and UDS) on my 64-bit Windows computer stored in the C:Windows\System32 folder, and I copied the 64-bit versions of each DLL.
I'm using Visual Studio 2017 and C#.
Any ideas why I can't seem to be able to load the PCAN-UDS.dll from my app?
Thanks.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Can't Load the PCAN-UDS.dll
Check if the DLLs are placed in the correct directories - see here
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 6
- Joined: Wed 19. Dec 2018, 03:29
Re: Can't Load the PCAN-UDS.dll
Yes, they are all in the System32 directory as I mentioned in my original post.
And the Basic DLL is read and works fine, but not the UDS.
Two different people on our team independently did this and found the same thing.
And the Basic DLL is read and works fine, but not the UDS.
Two different people on our team independently did this and found the same thing.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Can't Load the PCAN-UDS.dll
You wrote that you use C# - this is based on the .NET Framework - so please also check if you have NOT setup explicit in your project to be a 32Bit Application.
If you sure that from your side all is OK - use our SystemInfo Tool , run a scan and send to support[at}peak-system.com. It works on thousends of customer PCs - why should it not work on yours
If you sure that from your side all is OK - use our SystemInfo Tool , run a scan and send to support[at}peak-system.com. It works on thousends of customer PCs - why should it not work on yours

--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 6
- Joined: Wed 19. Dec 2018, 03:29
Re: Can't Load the PCAN-UDS.dll
While you were posting your reply, I sent into System32 and pulled up property windows on each of the DLLs to make sure each was truly the 64-bit version, and that was all fine.
So I went into the SysWOW64 folder and sure enough, only found the BASIC dll file there. Verified it was the 32-bit version. So after copying the other 2 32-bit DLL files, the app worked! Which was is likely due to the thing you suggested looking into (although I haven't yet).
I know that we did not set a specific target (used the new project wizard), but perhaps the default is for 32-bit. But I didn't think that .NET targetted a specific 32/64 version in the app itself and simply let the OS determine that at runtime?
At any rate, we are running now!
Thank you for the quick response!
So I went into the SysWOW64 folder and sure enough, only found the BASIC dll file there. Verified it was the 32-bit version. So after copying the other 2 32-bit DLL files, the app worked! Which was is likely due to the thing you suggested looking into (although I haven't yet).
I know that we did not set a specific target (used the new project wizard), but perhaps the default is for 32-bit. But I didn't think that .NET targetted a specific 32/64 version in the app itself and simply let the OS determine that at runtime?
At any rate, we are running now!
Thank you for the quick response!
Last edited by sabinhagen on Wed 19. Dec 2018, 15:45, edited 1 time in total.
-
- Posts: 6
- Joined: Wed 19. Dec 2018, 03:29
Re: Can't Load the PCAN-UDS.dll
Just for future users, I did find that Visual Studio has checkbox in the Build settings for Platform Target, and the checkbox is for Prefer 32-bit. On our systems, that box is checked by default.
On the other machine having the same issue, we will try to change that check box and see if that resolves the issue as we suspect it will.
Thanks again for the assistance!
On the other machine having the same issue, we will try to change that check box and see if that resolves the issue as we suspect it will.
Thanks again for the assistance!
Re: Can't Load the PCAN-UDS.dll
Hello,
Just for information. Check the Project configuration when using Any CPU. See attached picture
Just for information. Check the Project configuration when using Any CPU. See attached picture
- Attachments
-
- Configuration.PNG (26.94 KiB) Viewed 8664 times
Best regards,
Keneth
Keneth
Re: Can't Load the PCAN-UDS.dll
Hello,
I have a strange problem with loading dlls.
My application works fine on 3 computers, but on the fourth one, it doesn't load 32 or 64 bit dlls.

It seems to be a dependency problem?

Do you have any idea?
config : Seven Pro 64bit pack 1. (Pcan ISO and UDS in the app directory but also 32bit in Wow64 and 64bit in sys32)
Best regards.
I have a strange problem with loading dlls.
My application works fine on 3 computers, but on the fourth one, it doesn't load 32 or 64 bit dlls.

It seems to be a dependency problem?

Do you have any idea?
config : Seven Pro 64bit pack 1. (Pcan ISO and UDS in the app directory but also 32bit in Wow64 and 64bit in sys32)
Best regards.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Can't Load the PCAN-UDS.dll
Looks like you have mixed up any of the need DLLs (32Bit & 64Bit )
Simpy search on you System for this DLL´s - delete all of them - copy the needed one in the correct directory.
SysWow64 and System32 --> link
Also read the Thread here - it´s all explained ...
Simpy search on you System for this DLL´s - delete all of them - copy the needed one in the correct directory.
SysWow64 and System32 --> link
Also read the Thread here - it´s all explained ...
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Can't Load the PCAN-UDS.dll
Sorry, but it's done too:
On a 64-bit operating system, copy the 32-bit DLLs to c:\Windows\SysWoW64.
On a 64-bit operating system, copy the 64-bit DLLs into the c:\Windows\System32 directory.
For the other computers where my application works well, the DLLs are just placed in the debug with the executable (Dot.Net 4)
I don't understand why it works on 3 computers (seven and win10) and not for the fourth -_-
thank for help
On a 64-bit operating system, copy the 32-bit DLLs to c:\Windows\SysWoW64.
On a 64-bit operating system, copy the 64-bit DLLs into the c:\Windows\System32 directory.
For the other computers where my application works well, the DLLs are just placed in the debug with the executable (Dot.Net 4)
I don't understand why it works on 3 computers (seven and win10) and not for the fourth -_-
thank for help