From: ianrae88@... (Ian Rae) Date: 2001-12-29T05:15:30+09:00 Subject: [ruby-talk:29579] Re: Need windows extension dll help "Mark Hahn" wrote in message news:... > I have been trying to build and run ruby-gtk in windows >[..] This leaves me with mswin32. >[..] > helloworld.rb:8:in `require': 998: Invalid access to memory location. > - C:/RUBY/lib/ruby/1.6/i586-mswin32/gtk.dll (LoadError) > from helloworld.rb:8 > > I then ran the debugger and watched Ruby make this windows library call: > > LoadLibraryExA("c:/ruby/lib/ruby/1.6/i586-mswin32/gtk.dll", 0x00000000, > LOAD_WITH_ALTERED_SEARCH_PATH) > > which returned the 998 error above. > MSVC's libraries contain a default version of DLLMain if your code doesn't provide one. The default one would, among other things, call constructors of global C++ objects. Check out Q196069 at MSDN (http://search.microsoft.com/us/dev/default.asp). The article states that error 998 in this situation means an access violation occured (such as dereferencing a NULL pointer) and suggests a way to debug it and get a stack dump. Not much but it might help.. --Ian