Module: OCI8::Win32Util

Defined in:
ext/oci8/win32.c

Class Method Summary collapse

Class Method Details

.dll_pathObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'ext/oci8/win32.c', line 36

static VALUE dll_path(VALUE module)
{
    HMODULE hModule;
    DWORD len;
    char path[1024];

    hModule = GetModuleHandle("OCI.DLL");
    if (hModule == NULL) {
        raise_error();
    }
    len = GetModuleFileName(hModule, path, sizeof(path));
    if (len == 0) {
        raise_error();
    }
    return rb_external_str_new_with_enc(path, len, rb_filesystem_encoding());
}

.enum_homesObject



123
124
125
126
127
128
129
# File 'ext/oci8/win32.c', line 123

static VALUE enum_homes(VALUE module)
{
    enum_homes_arg_t arg;
    arg.hKey = NULL;
    arg.hSubKey = NULL;
    return rb_ensure(enum_homes_real, (VALUE)&arg, enum_homes_ensure, (VALUE)&arg);
}