Menu

#66 SetScrollInfo incorrectly raises exception

closed-fixed
nobody
win32 (141)
5
2004-04-22
2003-11-07
No

I'm using win32all build 163 on Windows XP. I just got
an api exception with 0 error code when using
win32gui.SetScrollInfo. It looks like the reason for this
is that PySetScrollInfo treats the result of the
SetScrollInfo api call as a BOOL, with a false result
indicating error. My copy of the win32 api
documentation states that SetScrollInfo returns the
current position of the scroll box. This position
happened to be 0 in my case, so PySetScrollInfo raised
an exception.

Also, I just discovered that win32gui.GetScrollInfo also
generates an api error with a 0 error code. Looking at
the source, I note that PyGetScrollInfo does not fill in
the fMask field before calling GetScrollInfo. My
documentation indicates the mask must be initialized to
specify which members to retrieve.

Discussion

  • Greg Chapman

    Greg Chapman - 2003-11-07

    Logged In: YES
    user_id=86307

    Also concerning win32gui.GetScrollInfo, if it creates an
    exception because ok is false, it fails to return NULL.

     
  • Greg Chapman

    Greg Chapman - 2003-11-11
     
  • Greg Chapman

    Greg Chapman - 2003-11-11

    Logged In: YES
    user_id=86307

    I'm attaching a diff file to indicate the changes I think are
    needed. I used the web CVS browser to get the win32gui.i
    file, so the date of the original is wrong, but it is revision
    1.31. The changes included address both this report and
    report 838065.

     
  • Mark Hammond

    Mark Hammond - 2004-04-22
    • status: open --> closed-fixed
     
  • Mark Hammond

    Mark Hammond - 2004-04-22

    Logged In: YES
    user_id=14198

    Sorry for the delay! I checked this in:
    Checking in win32gui.i;
    new revision: 1.36; previous revision: 1.35

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.