Using the 64-bit cyusb.sys by a 32-bit app

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Is it possible to access the 64-bit cyusb.sys from a 32-bit application? I have a fixed 32-bit app that communicates with external cypress-based usb devices using dll plugins but I don't know exactly how to achieve 32-64-bit bridging.

   

Please help.

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

      Yeah, Its possible. WOW 64 emulator provides the interface.

   

Thanks,

   

Prajith

0 Likes
Anonymous
Not applicable

Thanks for your response.

   

What is that interface exactly? Currently I have the 32-bit plug-in dll which works with the 32-bit cyusb.sys on a 32-bit Windows. All is fine. But for the 64-bit windows it seems like I need to build a 64-bit dll with the 64-bit cyapi.lib compiled (I use Cypress Suite 3.4.6 for that). But 32-bit app cannot access 64-bit dll directly (via LoadLibrary). I looked for some workarounds and found that I need to implement additional 64-bit process to receive IPC requests from a 32-bit code and work with 64-bit cyusb.sys. But this is kinda tricky so I don't really want to bother with that complex stuff.

   

So if you know exact methods and interfaces which are indeed simpler and more comfortable to use - please provide me some details.

0 Likes
Anonymous
Not applicable

32-bit apps run on x64 windows using WoW64 (windows on windows 64) emulation mode natively provided by windows itself. So 32-bit app will be able to communicate with x64 cyusb.sys.
So there is no issues on that side. The only thing you'll have to take care is how you pull in your custom dll into your code.

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

Thanks Anand.

   

I checked it on 64-bit win7 with my 32-bit app, 32-bit dll plug-in and 64-bit driver. Failed with that. Ok, I'll try it in a debugger to see where is the actual problem. Dll is loaded via LoadLibrary and I had no problems with that previously. Maybe there is something wrong with the export (setupapi.dll, mfc42.dll, msvcrt.dll, kernel32.dll, user32.dll, advapi.dll all seem to be quite safe and basic).

   

 

   

Ok, I'll check it closely. Thanks again.

0 Likes
Anonymous
Not applicable

My fault here indeed. Found and eliminated.

   

 

   

I'm so happy I don't have to play with those IPC wrappers. 🙂 Cypress forever.

   

 

   

Best regards,

   

Dmitry

0 Likes