I've created a 1.6.0 ruby extension (1.6.0 (2000-09-19) [i586-mswin32]),
using MSVC6.0, with July 2000 Platform
SDK, on Win2K Professional installed.

Test script only has the following:
----------
require "XPTRrb"
print "Hi!"
-----------

the entire extension file is:
--------------------
#if defined(_WIN32) || defined(__WIN32__)
#       if defined(_MSC_VER)
#               if defined(STATIC_LINKED)
#                       define DLLEXPORT(a) a
#               else
#                       define DLLEXPORT(a) __declspec(dllexport) a
#               endif
#       else
#               if defined(__BORLANDC__)
#                       define DLLEXPORT(a) a _export
#               else
#                       define DLLEXPORT(a) a
#       endif
#endif
#else
#       define DLLEXPORT(a) a
#endif

#include "ruby.h"

static VALUE mXptr;
static VALUE cMessage;

BOOL WINAPI
DllMain(HANDLE hModule, DWORD fdwreason, LPVOID lpReserved)
{
    switch (fdwreason) {
    case DLL_PROCESS_ATTACH:
        break;
    case DLL_THREAD_ATTACH:
        break;
    case DLL_THREAD_DETACH:
        break;
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

DLLEXPORT(void) Init_XPTRrb(void) {

    mXptr = rb_define_module("Xptr");
    cMessage = rb_define_class_under(mXptr, "Message", rb_cObject);

}
---------------------
compiles to XPTRrb.dll which I put in:
ruby\lib\ruby\site_ruby\1.6\i586-mswin32

If I comment out the cMessage line, the test scripts runs just fine, but if
I include the cMessage line, I receive the error:

The instruction at "0x10036cc9" referenced memory at "0x41442603".  The
memory could not be "read".

BTW, I've created an entire library that works just fine with several ruby
modules (based on mXptr) that works great, but as soon as I added a class, I
started to receive the error....

Any help would be appreciated...

Kevin Burge
Systemware, Inc.