Re: cards32.ew by Brian Broker: how move cards?
- Posted by Juergen Luethje <j.lue at g?x.de> Jul 05, 2007
- 669 views
Dan Moyer wrote: > Brian Broker wrote: > > > > Dan Moyer wrote: > > > > > > > > Thanks Larry, I was hoping to be able to work on my app on either machine, > > > but I see that will pretty near be impossible. > > > > > > Dan > > > > Nothing is impossible... Euphoria can't easily interact with 16-bit dlls but > > it doesn't have to... just copy the 32-bit version (cards32.dll) with your > > app. I seriously doubt that MS would have a problem with that... Afterall, > > I don't think they even support OS's less than XP anymore. > > > > =Brian > > > Hi Brian, > > Glad to see you here! > I was just going to ask people if copying 32-bit cards.dll or cards32.dll > over to Win98, but with a different name & then have app detect which op sys > is present & use either cards.dll on XP or xcards.dll(same one) on Win98, so > as not to make any problem with other apps on 98 expecting 16-bit cards.dll. > > But to do that, I need to detect op sys, & I haven't looked into that yet. > Anyone know how to do that? <snip>
include misc.e include dll.e include machine.e atom Kernel32 integer GetVersionEx if platform() = WIN32 then Kernel32 = open_dll("kernel32.dll") GetVersionEx = define_c_func(Kernel32, "GetVersionExA", {C_POINTER}, C_LONG) end if constant -- TYPE OSVERSIONINFO dwOSVersionInfoSize = 0, -- C_ULONG -- dwMajorVersion = 4, -- C_ULONG -- dwMinorVersion = 8, -- C_ULONG -- dwBuildNumber = 12, -- C_ULONG dwPlatformId = 16, -- C_ULONG -- szCSDVersion = 20, -- String*128 SIZEOF_OSVERSIONINFO = 148 global function win_platform() -- out: 1 = Windows 95/98/Me, 2 = Windows NT/2000/XP/Vista atom osinfo, void, ret osinfo = allocate(SIZEOF_OSVERSIONINFO) poke4(osinfo + dwOSVersionInfoSize, SIZEOF_OSVERSIONINFO) void = c_func(GetVersionEx, {osinfo}) ret = peek4u(osinfo + dwPlatformId) free(osinfo) return ret end function ? win_platform()
See http://msdn2.microsoft.com/en-us/library/ms724451.aspx for more information. Regards, Juergen