OLD version(s) of gerbv and/of VesaView?

To use in my modern Windows 2000 Professional SP5.

Reply to
Robert Baer
Loading thread data ...

I find it hard to believe you're having that many problems with getting that working.. Did you remove/rename the DLL's in the local folder to make sure it isn't loading the wrong one? I assume you have what you think is the correct DLL in the system32 folder?

Jamie

Reply to
Maynard A. Philbrook Jr.

If you're interested, I can send you a set of 2 DLLs (along with sources and install instructions) that allow the latest gerbv (as well as any other program that needs the getaddrinfo / freeaddrinfo / getnameinfo functions exported from ws2_32.dll) to function under w2k.

With some programming skill, you could extend them and add other functions (even to other dlls) as needed. The sources are no secret, but you'd still have to look for specific versions of certain compilers, assemblers, linkers and resource editors in order to recompile them as they are highly non-portable.

The installation is also a little tricky, it includes renaming and

*replacing* the original windows 2000 ws2_32.dll by a special "loader" dll that would load the original (renamed) dll as well as another one that provides the "missing" functions and arbitrate at runtime which functions shall be used from which of the modules (original with all the MS code or the additional one with just the 3 new functions).

To the applications it looks as if the original dll had always included those functions and as if they had always been there, part of w2k. In fact, unless the application tries to read and parse the dll's contents from disk, it has no way to tell that the 3 extra functions are not "just a normal part of w2k".

There's a caveat however: this dll module, once it is installed, works systemwide, and not just for any special program like gerbv. Every program (including winlogon and all other windows internal processes and services) will see the new dll. It's an "either-or", there's no way that I know of, to load the new dll into one program, but somehow skip it and not load it into another, different program.

It works on my small test system (gerbv works and nothing crashes), but I don't have all the programs that you have, and, even though the loader mimics the original windows dll fairly well, there may be some program you have in use that will find something amiss and stop working.

Also, even if the dlls were perfectly and indistinguishably compatible, which of course they are not, replacing system dlls via the command line in safe mode always has some risk of making a typo and putting the wrong dll into the wrong place by accident, with the obvious consequences.

Greetings from a fellow don-t-even-ask-me-about-vista oldtimer Dimitrij

Reply to
Dimitrij Klingbeil

WHy not a proxy DLL that is loaded in the local folder of the app? Just call it the same name so the app will see that one first and load it.

In this DLL, you load the real DLL using the full path name to get the one sitting in the system 32 folder. With this DLL, you need to make proxy entries for all the calls over to the real DLL and implement the ones that need to be added for this app!

(P.S.) I've done this before, also This is how I found undocumented functions in windows DLL's it is also how hackers redirect your system if you aint watching! :)

Jamie

Reply to
Maynard A. Philbrook Jr.

Color me confused. I downloaded the latest version and that installed. Launched it and got message procedure entry point freeaddrinfo could not be found in ws2_32.dll . I have not moved or renamed ANY dll, and there is ONLY ONE, and that one is "native" to the installation - meaning i have not replaced it or buggered it. So, now what?

Reply to
Robert Baer

Not only sounds tricky, but messy and sneaky. Well, i am willing to give it a try; will use a spare HD. Safe mode? In my older installs of Win2K,"SafeMode" was totally and absolutely useless. Maybe with this newer install, it will work because i do not have other OSes installed.

Perhaps the scheme could be patched to look for the calling program and then switch to what was needed for the calling program (based on a list easily modified externally)? If not in the list, then works exactly like original ws2_32.dll via a call to it; else call to a differently named program(s).

Reply to
Robert Baer

Wish i knew what that all means.. Could it not be symple, like the "extended" dll just BE in the gerbv folder?

Reply to
Robert Baer

I stole the XP version of ws2_32.dll from XP and got yet another error procedure entry point ntdll.dll could not be found. And stealing the XP version of ntdll.dll changed nothing for gerbv.

Why not an OLD version of gerbv (which i originally ASKED for)?

Reply to
Robert Baer

Try Viewmate from pentalogix.

Reply to
Martin Riddle

"Robert Baer" wrote in message news:jsemu.289469$ snipped-for-privacy@fx13.iad...

Hi Robert and Jamie

These dlls were written before Jamie posted the info about dlls in the program folder taking precedence. What is included through the link below, are the original dlls before Jamie's post, although there are more installation options available now. For details see below.

formatting link

What you should get, is a Zip file called "WS2_32_2000.zip" with size

45.495 bytes. Inside WS2_32_2000 are 2 folders ("WS2_32" and "WS2_32_USR") with one dll and its source code in each. The dll's CRC32 values are "7C2EFEA3" and "D18F7C98" respectively (just in case you like to verify).

The compiled dlls are provided for your convenience, but you can rebuild them from source if you like. The CRCs will change because the linker puts the build timestamp in the file. Depending on if you choose one-pass or two-pass assembly, or other optimizations, the size can change slightly.

Skip the following sections if you don't intend to recompile from source.

To recompile "WS2_32", you need Borland Turbo Assembler (TASM) 5.0. Use the

32-bit assembler and linker, TASM32 and TLINK32 respectively. Set case sensitivity to "all" (/ml option) for TASM32. Set module type to "dll", case-sensitive, application type to "windowing compatible" and base address to "74400000" (-Tpd -c -ap -B:74400000 options) for TLINK32. Link with the provided "def" and "res" files as well as the "import32.lib" that comes with Turbo Assembler. The res file can be edited with any suitable resource editor (e.g. Borland Resource Workshop).

Note that Turbo Assembler is from 1996. Borland has stopped selling and supporting it long ago. In its days it was sufficiently popular and today it is sufficiently ancient, so that many abandonware sites have copies.

To recompile "WS2_32_USR" you will need Microsoft Visual C++ Toolkit 2003 and Microsoft Platform SDK for Windows Server 2003 SP1. Use the "Windows

2000 Build Environment (Retail)" from the SDK and inside that command window call "vcvars32.bat" from the C++ toolkit to set up the build environment. Then change directory to where the dll sources are and call the included "compile.cmd" to compile the dll.

Anyway, once you have the dlls (the included ones or the ones you have compiled yourself), there are two possible ways to install them.

Thanks to the hint from Jamie about dlls in the program directory having a higher priority in the load order than the ones in %windir%\system32, it's also possible to install them for a specific program only. Sure enough, it should look trivial, and it's usually the trivial things that one tends to forget, but when writing these dlls I did not remember the load priority and had at first assumed that "system32" gets higher priority. Thanks Jamie for pointing that out.

Although the dlls have originally been written for system-wide installation, I've just tested Jamie's idea, and it turns out that they work for a single program (gerbv) just as well. There was even no need to change anything in the dll code, it turned out to be universal enough to allow both ways of installation. Here are both instructions, for the sake of completeness. Both are possible, even though you'll likely only want the first one.

-----------------------------------

  1. Installation for one program (gerbv) only (Thanks Jamie!):

a) start windows normally, no safe mode needed b) find the original WS2_32.dll in the WINNT\SYSTEM32 directory c) make a copy of it, name the copy "WS2_32_SYS.dll" (note that the filename is hard-coded, the name must be exactly as written) d) put this copy (ws2_32_sys.dll) into the gerbv program directory e) put the 2 new dlls (ws2_32.dll and ws2_32_usr.dll) from the zip archive (or the ones you compiled) into the gerbv directory too f) now in the gerbv directory there should (among others) be 3 dlls: - WS2_32.dll (your own or from the zip file) - WS2_32_USR.dll (your own or from the zip file) - WS2_32_SYS.dll (copy of the windows original "WS2_32.dll") if any are wrong or missing, you'll have plenty of opportunities and retries to correct mistakes whenever you like g) done, gerbv should now work :)

-----------------------------------

  1. System-wide installation (as was intended before Jamie's info)

a) start windows in "safe mode with command prompt" (otherwise windows file protection won't let you rename and replace the dll), log in and wait a couple of minutes until all services have started b) change into the \WINNT\SYSTEM32 directory (I will list the following commands in quotes, but don't type the quotes into the command prompt, type in only the commands inside) c) run "sfc.exe /cancel" (it will say something about changes applied on next restart) d) run "sfc.exe /purgecache" e) run "rename WS2_32.dll WS2_32_SYS.dll" to rename the original dll (note that the name must be exactly as written) f) copy the 2 new dlls (ws2_32.dll and ws2_32_usr.dll) from the zip archive (or the ones you compiled) into the WINNT\SYSTEM32 directory g) run "copy WS2_32.dll .\dllcache\" to put a copy into the dll cache h) run "dir ws2_32*.*" than take a good look and make sure that there are now the following 3 dlls shown in the system32 directory: - WS2_32.dll (your own or from the zip file) - WS2_32_USR.dll (your own or from the zip file) - WS2_32_SYS.dll (the windows original that used to be "WS2_32.dll") if any are wrong or missing, correct the mistake NOW, any mistake that gets overlooked will make the system unbootable and fixing it will be difficult (only possible to boot from the installation CD) i) press ctrl-alt-del, log off, and reboot j) done, any program that needs the 3 new functions should now work :)

-----------------------------------

Make sure you only use ONE of the installation options, not both together.

If gerbv still does not work, it's probably also missing gdiplus.dll from microsoft. A "fresh" windows 2000 installation does not have it, but if MS office is installed, it will already be there. If you don't have it, get the "Platform SDK Redistributable: GDI+" from the microsoft download site, extract it, and put gdiplus.dll from the "asms\10\msft\windows\gdiplus" directory into your WINNT\SYSTEM32 directory. That should fix gdiplus.

Regards Dimitrij

Reply to
Dimitrij Klingbeil

!CHECK!!!!! Naturally, Viewmate install had a problem in that the URL for the .NET install was incorrect; customer service (!EXCELLENT!) gave: ftp://ftp.pentalogix.com/FreeUtilities/DotNET2/dotnetfx.exe . And i am a free user, so that says a lot for their customer service.

Also, of all of the Gerber viewers, it is the ONLY one that shows my logo (like on a final PCB). What i think as impressive, is that it supports 255 NAMED layers; just name them as in Eagle and all is spiffy!

It is well worth PAYing for!

There is one niggle, there are so many tools on the screen, that the workspace leaves a lot to be desired. Perhaps they will fix that (i made comments and generic suggestions).

Reply to
Robert Baer

Good idea! Somehow it escaped me that the program directory is before "%systemroot%\system32" in the dll search order. As always, it's the most trivial things that one forgets! Not having to deal with the proxy dll being loaded so early in the boot process (think: winsrv, winlogon) that things like microsoft's C runtime library are unavailable or not yet initialized makes the whole thing a lot easier. Especially for a programmer who is not used to always think about "what is already loaded, what part of it is initialized, and what isn't even there at this stage". Of course, a proxy dll that already survives loading at boot time, before winlogon.exe gets to run, will likely work in more "normal" circumstances, but hardly the other way around :)

The program directory option probably won't work for the few dlls that get loaded before the process exe to bootstrap the module loader itself (kernel32.dll being the prime candidate here), but proxying kernel32.dll (especially system-wide) is a can of worms like no other, and just getting a system to boot up with a most simple proxied kernel32.dll (with just redirects, no real user code yet included) without a blue screen is a tricky task, let alone anything more useful. But who knows, when support for XP ends, that may be, if it works, one of few remaining options (aside from writing drivers) to patch out newly-found exploits and keep things running.

Regards Dimitrij

Reply to
Dimitrij Klingbeil

Depends how old. Versions down to "2.2.0" are available on sourceforge (see

formatting link
). Older than that, no idea if anyone keeps them somewhere publicly accessible. At least I haven't seen them anywhere yet.

Dimitrij

Reply to
Dimitrij Klingbeil

I appreciate all of the work you have done, but.. I got tired of fighting gerbv and ripped it out and now am using VesaView which,unlike any other viewer,shows my logo. I can also magnify into the 0.05mil level or better. Customer service was excellent - and i am one of those free users.

Reply to
Robert Baer

I see they're a reseller for Eagle now. I didn't notice that last year when I downloaded the new version of Viewmate.

Cheers

Reply to
Martin Riddle

Perhaps that reseller link will encourage them in spiffing up their interface from icons cluttering half the screen to Eagle-similar pull-down menus.

Reply to
Robert Baer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.