Subversion Repositories Kolibri OS

Rev

Rev 7984 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7984 Rev 8490
Line 14... Line 14...
14
	#define _TEXT_ERROR_ADD "'Error while loading library\n"
14
	#define _TEXT_ERROR_ADD "'Error while loading library\n"
15
#endif
15
#endif
Line 16... Line 16...
16
 
16
 
Line 17... Line -...
17
char a_libdir[43]  = "/sys/lib/\0";
-
 
18
 
-
 
19
:inline void error_init(dword lirary_path)
-
 
20
{
-
 
21
	char error_text[1024];
-
 
22
    strcpy(#error_text, _TEXT_ERROR_ADD);
-
 
23
    strcat(#error_text, lirary_path);
-
 
24
    strcat(#error_text, "' -E");
-
 
25
	notify(#error_text);
-
 
26
}
17
char a_libdir[43]  = "/sys/lib/\0";
27
 
18
 
28
// stdcall with 1 parameter
19
// stdcall with 1 parameter
29
:void dll_Load() {
20
:void dll_Load() {
30
asm {
21
asm {
Line 186... Line 177...
186
        leave
177
        leave
187
        ret     8
178
        ret     8
188
    }
179
    }
189
}
180
}
Line 190... Line 181...
190
 
181
 
191
:int load_dll2(dword dllname, import_table, byte need_init)
182
:void load_dll(dword dllname, import_table, byte need_init)
192
{
-
 
193
   //dword dllentry=0;
183
{
194
// load DLL
184
// load DLL
195
        $mov     eax, 68
185
        $mov     eax, 68
196
        $mov     ebx, 19
186
        $mov     ebx, 19
197
        ECX=dllname;
187
        ECX=dllname;
Line 235... Line 225...
235
        $jmp     import_loop01
225
        $jmp     import_loop01
236
@import_done01:
226
@import_done01:
237
        #ifndef NO_DLL_INIT
227
        #ifndef NO_DLL_INIT
238
        IF (need_init) dll_Init (DSDWORD[EDX+4]);
228
        IF (need_init) dll_Init (DSDWORD[EDX+4]);
239
        #endif
229
        #endif
240
        return 0;
230
        return;
241
@exit01:
231
@exit01:
242
        return -1;
232
        error_init(dllname);
243
}
233
}
Line 244... Line -...
244
 
-
 
245
:byte load_dll(dword dllname, import_table, byte need_init)
-
 
246
{
234
 
247
	if (load_dll2(dllname, import_table, need_init))
235
:inline void error_init(dword lirary_path)
248
	{
236
{
-
 
237
    char error_text[1024];
-
 
238
    strcpy(#error_text, _TEXT_ERROR_ADD);
249
		error_init(dllname);
239
    strcat(#error_text, lirary_path);
250
		return false;
-
 
251
	}
240
    strcat(#error_text, "' -E");
252
	return true;
241
    notify(#error_text);
Line 253... Line 242...
253
}
242
}
254
 
243