Changeset 2272

Show
Ignore:
Timestamp:
07/18/08 16:35:17 (6 months ago)
Author:
bzr
Message:

Raise an exception when initialisation or termination of our external hook dlls returns an error code.

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        1631632071 jamie@jantrid.net-20080717082255-qi2pohdq0fle4wom 
        1641642072 jamie@jantrid.net-20080717082649-5vcsoj2nbniolr98 
         1652075 jamie@jantrid.net-20080718045149-w7o3m5k0vip4iz7i 
    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-07-17 18:26:49.155999899 +1000 
         1timestamp: 2008-07-18 14:51:49.259000063 +1000 
        22committer: James Teh <jamie@jantrid.net> 
        33properties:  
        44        branch-nick: main 
         5        rebase-of: jamie@jantrid.net-20080718045149-097h9sg31n8t6b0j 
  • trunk/source/NVDAHelper.py

    r2197 r2272  
    3434        global helperLib, winEventHookID 
    3535        helperLib=ctypes.windll.LoadLibrary('lib/NVDAHelper.dll') 
    36         helperLib.initialize() 
     36        if helperLib.initialize() < 0: 
     37                raise RuntimeError("Error initializing NVDAHelper") 
    3738        winEventHookID=winUser.setWinEventHook(EVENT_TYPEDCHARACTER,EVENT_INPUTLANGCHANGE,0,winEventCallback,0,0,0) 
    3839 
     
    4041        global helperLib 
    4142        winUser.unhookWinEvent(winEventHookID) 
    42         helperLib.terminate() 
     43        if helperLib.terminate() < 0: 
     44                raise RuntimeError("Error terminating NVDAHelper") 
    4345        del helperLib 
  • trunk/source/keyboardHandler.py

    r2247 r2272  
    210210def initialize(): 
    211211        """Initialises keyboard support.""" 
    212         keyHookLib.initialize(internal_keyDownEvent,internal_keyUpEvent) 
     212        if keyHookLib.initialize(internal_keyDownEvent,internal_keyUpEvent) < 0: 
     213                raise RuntimeError("Error initializing keyHook") 
    213214 
    214215def terminate(): 
    215         keyHookLib.terminate() 
     216        if keyHookLib.terminate() < 0: 
     217                raise RuntimeError("Error terminating keyHook") 
  • trunk/source/mouseHandler.py

    r2177 r2272  
    140140        curMousePos=(x,y) 
    141141        screenWidth,screenHeight=api.getDesktopObject().location[2:] 
    142         mouseHookLib.initialize(internal_mouseEvent) 
     142        if mouseHookLib.initialize(internal_mouseEvent) < 0: 
     143                raise RuntimeError("Error initializing mouseHook") 
    143144 
    144145def pumpAll(): 
     
    158159 
    159160def terminate(): 
    160         mouseHookLib.terminate() 
     161        if mouseHookLib.terminate() < 0: 
     162                raise RuntimeError("Error terminating mouseHook")