1. bugs in win32lib 0.70.4a

This is about problems with win32lib on RDS Eu, which happen to have been spotted by trying to run it on the other not-to-be-mentioned thing.

w32resources.ew:

procedure setMousePointer_( object id, atom handle, integer flag) 
    sequence lKids,lCursors 
    ... 
    if flag then 
        lCursors=handle 

Obviously, storing an atom in a sequence is nonsense/will crash every time.

UPDATE: lCursors is next passed to

procedure setCursorInternal(integer id,sequence data)  

so my best (but still ill-informed) guess is it should have been

        lCursors = {handle} 

In any case, it has clearly never been tested.

win32lib.ew:

global function setParent(integer id, integer pNewParent,object index) 
    ... 
    elsif sequence(id) then 
        if not integer(id[1]) or not integer(id[2]) then 
            ... 

UPDATE: Derek has since agreed that id should be an object.

procedure handleLV(integer id,atom flags,object lvcol) 
    sequence attribs 
            attribs=-2 

storing an atom in a sequence.

global procedure deleteLine(integer id,integer line) 
    ... 
    if atom(line) then 
        line={line,line} 
    end if 
    p=sendMessage(id,EM_GETLINECOUNT,0,0) 
    if line[1]>p then 
    ... 

clearly line should be defined as an object.

in w32memory, we have:

global function w32from_memory(atom struct,sequence s) 

but in compat02.ew we have:

global function fetch_SYSTEMTIME( atom st ) 
return w32from_memory(ID_SYSTEMTIME, st ) 
end function 
 
global function fetch_CHARFORMAT( atom CHARFORMAT ) 
return w32from_memory(ID_CHARFORMAT, CHARFORMAT) 
end function 

which are both going to pass an atom into a sequence.

I would also like to point out this line from compat02.ew:

TVDISPINFO_TVITEMcchTextMax = {TVDISPINFO_item,TVITEM_pszText+4} 

I honestly don't know, but that +4 looks very wrong to me.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu