SUB-20-100120-x64 Link with sub20.dll

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Bocdan
Posts: 18
Joined: Sat Aug 21, 2010 5:31 am

SUB-20-100120-x64 Link with sub20.dll

Post by Bocdan »

Hi,

Here it goes !

I am currently working and building my C++ project on 2 different computers, one using Windows XP (32 bits) and one using Windows 7 (64 bits). So I installed the SUB-20 Tools on but computers using the SUB-20-100120-x64.exe for Windows 7 and SUB-20-100120-x32.exe for Windows XP. I opened the sub-win tool projects using MS Visual Studio 2008 on both computers. Compiled on both computers and everything is fine. If I launch the application on Windows XP everything is fine and I can access the SUB-20. I even created my own software and it works too. Now I go on the Windows 7 platform and launch the tool. I get the cannot find sub20.dll error. Also, if I launch the tool on windows 7 without rebuilding the project, it works fine. I searched for the sub20.dll file and I only find it in WINDOWS\SYSTEM32 and cannot be found in sysWOW64. So I guess the sub20.dll is missing for the x64 version. Where can I find it ?

Dan

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by xol »

Hi,
I would suggest you to try latest version
viewtopic.php?f=2&t=3#p353
Let us know if it helped.

Bocdan
Posts: 18
Joined: Sat Aug 21, 2010 5:31 am

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by Bocdan »

I tried the latest files and I still have the same problem with the x64 version on Visual Studio 2008

Bocdan
Posts: 18
Joined: Sat Aug 21, 2010 5:31 am

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by Bocdan »

Looks like this bug was reported before but I don't think it was fixed properly.

See:
http://xdimax.net/forum/viewtopic.php?f=2&t=6&start=0

They say they are moving sub20.dll from sysWOW64 to System32 in the x64 .exe file but when I open the project, it looks into the sysWOW64 folder for the .dll not the system32.

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by serg »

Hi Dan,

Windows looks for 32-bit dlls in the sysWOW64 and 64-bit in the system32 directory. If you are using 32-bit executable on 64-bit platform copy the 32-bit sub20.dll into the sysWOW64 directory manually. You can take it from your XP machine windows. In this case we have to have both 32 and 64-bit versions of the sub-20.dll installed.

Regards

Bocdan
Posts: 18
Joined: Sat Aug 21, 2010 5:31 am

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by Bocdan »

I am running the 64bits executable on my Windows 7 computer, I found sub20.dll in SYSTEM32 after running the installer. Still when compiling the sub-win project (in C:\Program Files\SUB-20\sample\sub-win) from scratch without modifying it with Visual Studio 2008(9.0), it won't work. It says it "Can't find sub20.dll".

If I do the same with my Windows XP computer, i.e. I run the 32bits executable on Windows XP and I find sub20.dll is in SYSTEM32 (sysWOW64 doesn't exist) after running the installer. When I compile the sub-win project from scratch without modifying it with Visual Studio 2008(9.0), it works fine.

So there is something wrong for sure with the executable.

Anyway, what should I do to create a C++ project on Visual Studio 9.0 with the 64 bits drivers on a 64 bits platform ?

Where should the sub20.dll be copied ?
What .lib should I include ?

---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------

And now on my Windows XP platform, I get the "SUB-20 USB driver has not passed Windows logo testing error." when I try to re-install the SUB-20 USB drivers. If I don't accept to proceed with the installation, I can't see my SUB-20 on my USB ports. If I proceed with the installation, I can work with it for some time but then it crashes my computer. How do I fix this new problem ?

I am getting frustrated over this problem, please help !

Dan

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by serg »

Hi Dan,
Anyway, what should I do to create a C++ project on Visual Studio 9.0 with the 64 bits drivers on a 64 bits platform ?
Nothing special, here are the steps
1) Install 64-bit sub-20 installer on 64-bit platform
2) Open sub-tool sample project from VS9, convert the project into VS9 format
3) Select "Debug x64" or "Release x64" and build the project

I can work with it for some time but then it crashes my computer. How do I fix this new problem ?
Can you provide more details on this, i.e When it crashes, i.e connect/disconnect/some operation/suddenly etc? BSOD info, i.e exception number, module name etc. Can you send a BSOD kernel memory dump so we can analyze it?

Thank you for your cooperation

Bocdan
Posts: 18
Joined: Sat Aug 21, 2010 5:31 am

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by Bocdan »

Hi serg,

First, thanks for all the help. I was able to build the x64 project. I forgot to switch it from win32 to x64 in the configuration manager.


Second, here's the problem that I encounter when I install the 32 bits driver on my windows XP machine:

Image

Now that I have everything working on my windows 7 machine I don't care about this problem anymore so I selected STOP installation. But when I used to continue with the installation, I would be able to access the SUB-20 and build projects and all. But then it would start to slow down my PC. The linker in Visual C++ would freeze which in turn would prevent me to close Visual C++ or stop me from rebuilding or cleaning my project. It wouldn't even let me turn off my computer. I would finally get to a point where the only remaining solution would be to reboot my PC. Now, If I don't proceed with the installation I don't get those side effects

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by serg »

Hi Dan,

The dialog message simply says that our software has not passed windows logo program. Press "continue anyway" to install the software. The symptoms you encountered usually related to memory leaks i.e memory allocation without freeing, i.e this would slow down the machine until it hangs completelly. Could you please do the following. Try to reboot the machine and run sub-tool in the GPIO loop mode with the refresh interval, let's say 100ms. Open the Windows Performance monitor and try to see what happens, i.e memory leaks? kernel? user? etc. If everything is OK try to do the same by running your application by itself and under the VC debugger. Let me know your results

Regards

Bocdan
Posts: 18
Joined: Sat Aug 21, 2010 5:31 am

Re: SUB-20-100120-x64 Link with sub20.dll bug

Post by Bocdan »

The problem happens when I add the pragma:

#include "libsub.h"

into my program

There's no cross linking and I use that pragma only once but still it causes a LNK1000 error during the link which causes the linker to crash (easily recovered on Windows 7 but terribly slows my computer with Windows XP).

The linker crash happens every 2-3 times.

Here's what happens:

Image



Dan

Post Reply