1. WinLib Bugs 12/2007

Hello there,



I DL'd the latest version (i guess it is) from the archives and
ran into a few problems.  I'll number them here...

1.  Trying to unzip the .zip file leads to a problem (XP-SP2) that says that
    some of the files are password protected.  This makes it harder
    to unzip and therefore use the library.  This should be corrected.

2.  In file w32resources.ew, in procedure setPrinterPointers,
    apparently this function is called automatically as the lib is loaded.
    The problem comes in when the user does not have a printer installed
    in the system (had problems with mine so im not using it right now).
    The vDevmodeSize variable gets loaded to -1 and this causes an
    error 473 that states that memory can not be allocated.  The workaround
    was to simply test this var for less than zero and load it with 256.
    This number was picked at random just to get things booted up so
    more research time will have to be put into this issue for whoever
    is working on this Lib now.  Keep in mind that many systems will not
    have a printer installed so it's a good idea to fix this.

3.  In file version.e, in function getEuVersion(), the var s1 must
    be made to be an object because getenv() sometimes returns an atom.
    More appropriate testing on this var also has to be done to find
    out if it's an atom before the length can be tested, as usual.
    The workaround is "if atom(s1) or (not length(s1)) then"
    but there is more code after that too that needs to be tested
    for atom type.  This should be easy to fix.


Take care,
Al

E boa sorte com sua programacao Euphoria!


My bumper sticker: "I brake for LED's"

 From "Black Knight":
"I can live with losing the good fight,
 but i can not live without fighting it".
"Well on second thought, maybe not."

new topic     » topic index » view message » categorize

2. Re: WinLib Bugs 12/2007

Al Getz wrote:
> 
> Hello there,
> 
> 
> I DL'd the latest version (i guess it is) from the archives and
> ran into a few problems.  I'll number them here...
> 
> 1.  Trying to unzip the .zip file leads to a problem (XP-SP2) that says that
>     some of the files are password protected.  This makes it harder
>     to unzip and therefore use the library.  This should be corrected.
> 

Drag and drop the files from the "compressed folder", or get a decent free unzip
utility. 7-zip is quoted often, there are many other.
I don't have the permissions to correct the native XP support for zip files. I
admit it should be corrected.

> 2.  In file w32resources.ew, in procedure setPrinterPointers,
>     apparently this function is called automatically as the lib is loaded.
>     The problem comes in when the user does not have a printer installed
>     in the system (had problems with mine so im not using it right now).
>     The vDevmodeSize variable gets loaded to -1 and this causes an
>     error 473 that states that memory can not be allocated.  The workaround
>     was to simply test this var for less than zero and load it with 256.
>     This number was picked at random just to get things booted up so
>     more research time will have to be put into this issue for whoever
>     is working on this Lib now.  Keep in mind that many systems will not
>     have a printer installed so it's a good idea to fix this.
> 

Reported already, and fixed in 70.2e to come in a few hours.

> 3.  In file version.e, in function getEuVersion(), the var s1 must
>     be made to be an object because getenv() sometimes returns an atom.
>     More appropriate testing on this var also has to be done to find
>     out if it's an atom before the length can be tested, as usual.
>     The workaround is "if atom(s1) or (not length(s1)) then"
>     but there is more code after that too that needs to be tested
>     for atom type.  This should be easy to fix.
> 

Does it? Ok, I'll guard against this. I's an odd scenario, thanks for reporting
it.

CChris

> 
> Al
> 
> E boa sorte com sua programacao Euphoria!
> 
> 
> My bumper sticker: "I brake for LED's"
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: WinLib Bugs 12/2007

Al Getz wrote:
> 
> Hello there,
> 
> 
> I DL'd the latest version (i guess it is) from the archives and
> ran into a few problems.  I'll number them here...
> 
> 1.  Trying to unzip the .zip file leads to a problem (XP-SP2) that says that
>     some of the files are password protected.  This makes it harder
>     to unzip and therefore use the library.  This should be corrected.

The bug is in Microsoft's code. Ask Microsoft to fix it. I've had no problems
with it at all. I use Directory Opus to unzip and that just works.
 
> 2.  In file w32resources.ew, in procedure setPrinterPointers,
>     apparently this function is called automatically as the lib is loaded.
>     The problem comes in when the user does not have a printer installed
>     in the system (had problems with mine so im not using it right now).
>     The vDevmodeSize variable gets loaded to -1 and this causes an
>     error 473 that states that memory can not be allocated.  The workaround
>     was to simply test this var for less than zero and load it with 256.
>     This number was picked at random just to get things booted up so
>     more research time will have to be put into this issue for whoever
>     is working on this Lib now.  Keep in mind that many systems will not
>     have a printer installed so it's a good idea to fix this.


In w32resources.ew find the setPrinterPointers routine and replace 

VOID = w32Func(xOpenPrinter,{pname,phndl,0})
    vPrinterHandle=peek4u(phndl)           
    vDevmodeSize =w32Func( xDocumentProperties,
                           {0,vPrinterHandle,pname,0,0,0})
    hdefPtr = w32acquire_handle(GMEM_MOVEABLE,vDevmodeSize)
    hdmPtr = w32acquire_handle(GMEM_MOVEABLE,vDevmodeSize)
    ptr = w32handle_to_memory(hdefPtr)
    ptr2 = w32handle_to_memory(hdmPtr)
    VOID = w32Func( xDocumentProperties,
                    {0,vPrinterHandle,pname,ptr,0,DM_COPY})
    mem_copy(ptr2,ptr,vDevmodeSize)
    w32release_handle(hdefPtr,0)
    w32release_handle(hdmPtr,0)


with 

if w32Func(xOpenPrinter,{pname,phndl,0}) != 0 then
    vPrinterHandle=peek4u(phndl)           
    vDevmodeSize =w32Func( xDocumentProperties,
                           {0,vPrinterHandle,pname,0,0,0})
    hdefPtr = w32acquire_handle(GMEM_MOVEABLE,vDevmodeSize)
    hdmPtr = w32acquire_handle(GMEM_MOVEABLE,vDevmodeSize)
    ptr = w32handle_to_memory(hdefPtr)
    ptr2 = w32handle_to_memory(hdmPtr)
    VOID = w32Func( xDocumentProperties,
                    {0,vPrinterHandle,pname,ptr,0,DM_COPY})
    mem_copy(ptr2,ptr,vDevmodeSize)
    w32release_handle(hdefPtr,0)
    w32release_handle(hdmPtr,0)
end if




-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view message » categorize

4. Re: WinLib Bugs 12/2007

Derek Parnell wrote:
> 
> Al Getz wrote:
> > 
> > Hello there,
> > 
> > 
> > I DL'd the latest version (i guess it is) from the archives and
> > ran into a few problems.  I'll number them here...
> > 
> > 1.  Trying to unzip the .zip file leads to a problem (XP-SP2) that says that
> >     some of the files are password protected.  This makes it harder
> >     to unzip and therefore use the library.  This should be corrected.
> 
> The bug is in Microsoft's code. Ask Microsoft to fix it. I've had no problems
> with it at all. I use Directory Opus to unzip and that just works.
>  

Hmmm, well im glad *you* can use it just fine, that helps everyone else
who wants to download and use it with XP as they would normally use
a zip file quite a bit now, doesnt it?  smile
It's completely up to whoever uploads it i guess, if they want to 
make it simpler for everyone to use or not, it's their decision.
BTW, i've downloaded a countless number of zips and this is the
only one i ever had a problem with like this.


Take care,
Al

E boa sorte com sua programacao Euphoria!


My bumper sticker: "I brake for LED's"

 From "Black Knight":
"I can live with losing the good fight,
 but i can not live without fighting it".
"Well on second thought, maybe not."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu