mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-03-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b014cc337e
commit
d7b8e448bf
18 changed files with 127 additions and 67 deletions
|
@ -52,13 +52,10 @@ Win32API_initialize(self, dllname, proc, import, export)
|
|||
int len;
|
||||
int ex;
|
||||
|
||||
hdll = GetModuleHandle(RSTRING(dllname)->ptr);
|
||||
if (!hdll) {
|
||||
hdll = LoadLibrary(RSTRING(dllname)->ptr);
|
||||
if (!hdll)
|
||||
rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
|
||||
Data_Wrap_Struct(self, 0, Win32API_FreeLibrary, hdll);
|
||||
}
|
||||
hdll = LoadLibrary(RSTRING(dllname)->ptr);
|
||||
if (!hdll)
|
||||
rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
|
||||
rb_iv_set(self, "__hdll__", Data_Wrap_Struct(self, 0, Win32API_FreeLibrary, hdll));
|
||||
hproc = GetProcAddress(hdll, RSTRING(proc)->ptr);
|
||||
if (!hproc) {
|
||||
str = rb_str_new3(proc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue