[PD] [PD-announce] pd 0.50-0 test1 released

Christof Ressi christof.ressi at gmx.at
Fri Aug 9 19:33:05 CEST 2019


Good idea! I think it's mostly a Windows issue since macOS and Linux have been 64-bit for ages. On Windows this is how you can get the architecture:

1) open the file in binary mode
2) read the BYTE at location 0x3C to get the COFF header offset
3) seek to the COFF header offset
4) check that the first 4 bytes match the character sequence "PE\0\0" -> Windows binary
5) the next WORD is the machine type
6) 0x8664 -> x64, otherwise 32bit

https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types
https://superuser.com/a/889267

We would only need to do this check if LoadLibrary fails.

Christof

> Gesendet: Freitag, 09. August 2019 um 18:22 Uhr
> Von: "Miller Puckette" <msp at ucsd.edu>
> An: rolfm at dds.nl
> Cc: "Pd list" <pd-list at lists.iem.at>
> Betreff: Re: [PD] [PD-announce] pd 0.50-0 test1 released
>
> There should be a better error message for this... maybe I can find a way Pd
> can detect the mismatch instead of just failing.  This is likely to cause
> a lot of people a lot of trouble.
>
> thanks
> Miller
>
> On Fri, Aug 09, 2019 at 01:05:09PM +0200, rolfm at dds.nl wrote:
> > rolfm at dds.nl schreef op 09-08-2019 13:00:
> >
> > sorry, my bad: i used the 64-bits version instead of i386
> >
> > > opening my patch, which doesn't give problems in 0.48.1 or 0.49.0,
> > > with the test1 release it gives this:
> > >
> > > C:\Users\Gebruiker\AppData\Roaming\Pd\zexy\list2symbol.dll: couldn't
> > > load
> > >  list2symbol _
> > > ... couldn't create
> > > C:\Users\Gebruiker\AppData\Roaming\Pd\zexy\s2l.dll: couldn't load
> > >  s2l
> > > ... couldn't create
> > > C:\Users\Gebruiker\AppData\Roaming\Pd\zexy\l2s.dll: couldn't load
> > >  l2s _
> > > ... couldn't create
> > > C:\Users\Gebruiker\AppData\Roaming\Pd\zexy\l2s.dll: couldn't load
> > >
> > > looks like something changed or is missing.
> > >
> > > rolf
> >
> >
> >
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>





More information about the Pd-list mailing list