MySQL Forums
Forum List  »  MySQL Workbench

Re: Workbench 5.0.11 OSS on Win2k
Posted by: Jeremy Druker
Date: January 10, 2008 09:10AM

Hi Michael

[I've been trying for days to reply. Either I get told my post has been rejected because it looks like spam, or else the server appears to accept it, but it doesn't appear in the forum message list. Odd. Now I can see that the reply is saved somewhere, because an identical repost is recognised and rejected. One more try, this time using FF instead of Opera...]

Happy new(-ish) year and thanks for your interest.

> Could you post about the changes you made?

It was mainly to functions ImportMysqlCanvasDll and LoadAllImportsForDll in backend/workbench/canvas_selector.cpp (and in testing/tut/source/main.cpp, where the same functions appear with minor differences).

LoadAllImportsForDll was using __HrLoadAllImportsForDll to load mysql.canvas.dll, of which there are two versions, in different subdirectories of the Workbench EXE path.
__HrLoadAllImportsForDll only works when given a plain file name without a path, so in order to load the right DLL, it would first call SetDllDirectory to put the desired directory at the front of the path.

My change was to use LoadLibrary, which _does_ accept a full path name, to load the DLL into memory, and _then_ call __HrLoadAllImportsForDll with the plain file name.
__HrLoadAllImportsForDll recognises that the DLL has already been loaded, and just does whatever else it has to do (such as failing if a DLL needed by the one we just loaded is not available).

On my Win2K machine, which has an old OpenGL that requires the mesa version of mysql.canvas.dll, I can confirm that the non-mesa DLL is initially loaded, the OpenGL version check fails, that DLL is then unloaded and the mesa version is then loaded instead. This seems to be the intended behaviour.

I can mail you a diff -c style patch file (44Kb, most of which is changes to the vcproj files to define _WIN32_WINNT=0x0500 in place of _WIN32_WINNT=0x0502) and/or the updated sources, as you prefer - just give me an email addy. The changes to canvas_selector.cpp are not much, maybe 20 lines or so.


> Also, can you post about why you are still running Win2k it the days of Vista?
> I mean, it also took me a while to get off Win2k but I finally did switch to
> XP and did not regret it later on.

I've no real gripe against XP, but I've been really happy with 2k and until now have had no reason to change. I dread the thought of setting up a new system from scratch, but it's time to upgrade my hardware, which has zero chance of running Vista. It's an 800MHz Dell Latitude notebook with 512Mb RAM, and to my horror I discovered a year ago that it can't take more RAM. Plugged in 1Gb, it wouldn't turn on, eventually found out from specs that 512 is all it supports :-(

I've had only one close encounter with Vista, and that was enough for me to decide I want nothing whatsoever to do with it. So I've been wondering about alternatives, and guess what I came up with...

> p.s.: I'm on OS X these days, and just using Parallels to run XP and do my
> development work which works surprisingly well.

Oh, I'm SO glad you mentioned that! It's precisely what I've been considering. Please tell me Visual Studio runs fine; I've been using VS6 mostly since it is faster than VS.Net on my old machine, though I did recently install VS2005 and was pleasantly surprised by its performance. If VS works I'm ready to treat myself to a shiny new MacBook, pronto!

-J

Options: ReplyQuote


Subject
Views
Written By
Posted
7140
December 22, 2007 03:42PM
Re: Workbench 5.0.11 OSS on Win2k
4455
January 10, 2008 09:10AM
4104
January 10, 2008 09:22AM
5444
January 22, 2008 01:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.