GithubHelp home page GithubHelp logo

Comments (3)

mhammond avatar mhammond commented on July 18, 2024

It seems to work fine with other COM objects though - can you demonstrate the array element missing from some well-known object (eg, any Office product, Windows Scripting Host, IE, etc?)

from pywin32.

TeaTimeChimp avatar TeaTimeChimp commented on July 18, 2024

To be honest I'm struggling to find a standard library that returns arrays of UDTs - I'll keep looking though - in my case it's an in-house piece of software that's returning the array,
For what it's worth, I did a find-in-files for all cases of 'SafeArrayGetUBound' and by inspection all other places appear to treat the result as 'inclusive' whereas PyRecord.cpp treats it as 'exclusive'.
E.g.
PyCOMImpl.cpp @ 282: *resultSize = ub - lb + 1; // Plus one
PyCOMImpl.cpp @ 332: for (long i = lb; i <= ub; i++) { // Less or equal
oleargs.cpp @ 736: if ((unsigned long)(exist_ubound - exist_lbound + 1) != pBounds[dimLook - 1].cElements) { // Plus one.
oleargs.cpp @ 988: long cElems = ub - lb + 1; // Plus one.

from pywin32.

mhammond avatar mhammond commented on July 18, 2024

right, I missed that subtlety - only arrays of records are impacted. So yeah, it does sound like this might be a problem, thanks.

from pywin32.

Related Issues (20)

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.