[#4766] Wiki — "Glen Stampoultzis" <trinexus@...>

21 messages 2000/09/04
[#4768] RE: Wiki — "NAKAMURA, Hiroshi" <nahi@...> 2000/09/04

Hi, Glen,

[#4783] Re: Wiki — Masatoshi SEKI <m_seki@...> 2000/09/04

[#4785] Re: Wiki — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/09/05

Howdy,

[#4883] Re-binding a block — Dave Thomas <Dave@...>

16 messages 2000/09/12

[#4930] Perl 6 rumblings -- RFC 225 (v1) Data: Superpositions — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/09/15

[#4936] Ruby Book Eng. translation editor's questions — Jon Babcock <jon@...>

20 messages 2000/09/16

[#5045] Proposal: Add constants to Math — Robert Feldt <feldt@...>

15 messages 2000/09/21

[#5077] Crazy idea? infix method calls — hal9000@...

This is a generalization of the "in" operator idea which I

17 messages 2000/09/22

[#5157] Compile Problem with 1.6.1 — Scott Billings <aerogems@...>

When I try to compile Ruby 1.6.1, I get the following error:

15 messages 2000/09/27

[ruby-talk:5082] Application Error in 1.6.0 on Win2K

From: "Kevin Burge" <kcbspam@...>
Date: 2000-09-23 12:40:02 UTC
List: ruby-talk #5082
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.






In This Thread

Prev Next