FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Access to 1 FT245B with 2 different programs simultaneously  (Read 15886 times)

Oric

  • Newbie
  • *
  • Posts: 2
    • View Profile
Access to 1 FT245B with 2 different programs simultaneously
« on: November 21, 2023, 06:57:31 PM »

Hello FTDI Community  ;D

Originally I had a DLL written in Visual Studio 6 ( win98 ) to communicate with an ISA card.
Several programs written in Visual Basic 6 can access this DLL and communicate simultaneously with the card. The DLL is written using mutex principles.
I replaced the bus part of the card with an Ftdi FT245. I rewrote the DLL to use D2xx driver. I can make the programs work, but only one at a time. I use the FT_Open, FT_Write, FT_Read, FT_Close functions.
I tried to share the handle in shared memory.
The other programs recover it well and do not open the port if it is already open, and uses the handle retrieved from shared memory to control the FT_Write, FT_Read functions, but these write and read functions return an error.

Thank you for your help
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 897
    • View Profile
Re: Access to 1 FT245B with 2 different programs simultaneously
« Reply #1 on: November 22, 2023, 04:07:26 PM »

Hello,

When using the D2xx driver it can only be accessed by one handle at a time.

Note that FT245B is Not Recommended for New Designs (NRND) and is being made EOL.
See AN_559 Migrating from FT2xxB however the same limitation applies with the D2xx driver.

There could be other FTDI Community members who have experience with sharing a handle in shared memory but it's not something that FTDI support.

Best Regards,
FTDI Community
Logged

Oric

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Access to 1 FT245B with 2 different programs simultaneously
« Reply #2 on: November 22, 2023, 09:50:04 PM »

Yes, I know that the FT232 and FT245 can only be opened once. They provide a handle once opened.
This is why I only open it once and save the handle in shared memory so that other programs use it for read and write functions, but it doesn't work. I also have the same problem with the VCP driver
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 897
    • View Profile
Re: Access to 1 FT245B with 2 different programs simultaneously
« Reply #3 on: November 23, 2023, 04:50:35 PM »

Hello,

Unfortunately this is not something that we have any experience with.

Other FTDI community users may be able to help.

Best Regards,
FTDI Community
Logged