Giter Site home page Giter Site logo

Comments (6)

veeso avatar veeso commented on August 20, 2024

Well, this is pretty complicated I think.
In Linux when you initialize a communication with a serial device using the open() function and it returns to you a file descriptor (which is an integer), while in Windows the handler is stored in a HANDLE type variable, which is actually a void pointer.
Because of this, I don't think you coulduse the HANDLE of the COM structure to pass that control.
If I were you I'd check if it is possible to skip that check.

from termiwin.

Apollon77 avatar Apollon77 commented on August 20, 2024

I currently have ignored the check for windows.

In general the MSVC docs also have this function basically: https://msdn.microsoft.com/de-de/library/f4s0ddew.aspx and I found somewhere that it uses GetFileType() (https://msdn.microsoft.com/de-de/library/windows/desktop/aa364960(v=vs.85).aspx) and check for FILE_TYPE_CHAR.

So with this it could be added to your lib, or ?!

from termiwin.

Apollon77 avatar Apollon77 commented on August 20, 2024

PS: As alternative I would need kind if an "getHandle" method to get the Handle out of your struct to do such calls directly

from termiwin.

veeso avatar veeso commented on August 20, 2024

Ok, I've added getHandle() function to the library which returns the HANDLE from the COM structure

from termiwin.

Apollon77 avatar Apollon77 commented on August 20, 2024

then I use that one :-) thank you. Will report results later

from termiwin.

Apollon77 avatar Apollon77 commented on August 20, 2024

works. Maybe "getCurrentHandle" is better because in fact it can only habdle one serial connection, or ?!

from termiwin.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.