forked from KolibriOS/kolibrios
CMM: use load_dll in programs instead load_dll2
git-svn-id: svn://kolibrios.org@5626 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
17a7b0eed7
commit
9030b33ab3
@ -24,9 +24,6 @@
|
||||
?define MENU1_SUBMENU2 "‡ ªàëâì"
|
||||
?define MENU1_SUBMENU3 "‘¢®©á⢠"
|
||||
?define MENU1_SUBMENU4 "‚ë室"
|
||||
?define ERROR_LOAD_BOX_LIB "Žè¨¡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ - box_lib.obj"
|
||||
?define ERROR_LOAD_LIBIO "Žè¨¡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ - libio.obj"
|
||||
?define ERROR_LOAD_PROC_LIB "Žè¨¡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ - proc_lib.obj"
|
||||
#else
|
||||
?define T_FILE "File"
|
||||
?define T_TYPE "Type"
|
||||
@ -36,9 +33,6 @@
|
||||
?define MENU1_SUBMENU2 "Close"
|
||||
?define MENU1_SUBMENU3 "Properties"
|
||||
?define MENU1_SUBMENU4 "Exit"
|
||||
?define ERROR_LOAD_BOX_LIB "Error while loading library - box_lib.obj"
|
||||
?define ERROR_LOAD_LIBIO "Error while loading library - libio.obj"
|
||||
?define ERROR_LOAD_PROC_LIB "Error while loading library - proc_lib.obj"
|
||||
#endif
|
||||
|
||||
#ifdef LANG_RUS
|
||||
@ -135,9 +129,9 @@ void main()
|
||||
menu_text_area1.end = 0;
|
||||
|
||||
mem_Init();
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_LOAD_BOX_LIB);
|
||||
if (load_dll2(libio, #libio_init,1)!=0) notify(ERROR_LOAD_LIBIO);
|
||||
if (load_dll2(Proc_lib, #OpenDialog_init,0)!=0) notify(ERROR_LOAD_PROC_LIB);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libio, #libio_init,1);
|
||||
load_dll(Proc_lib, #OpenDialog_init,0);
|
||||
OpenDialog_init stdcall (#o_dialog);
|
||||
SetEventMask(0x27);
|
||||
loop()
|
||||
|
@ -167,7 +167,7 @@ void main()
|
||||
|
||||
mem_Init();
|
||||
SetEventMask(0x27);
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
list[SKINS].current = list[WALLPAPERS].current = -1;
|
||||
list[SKINS].first = list[WALLPAPERS].first = 0;
|
||||
TabClick(WALLPAPERS);
|
||||
|
@ -124,10 +124,10 @@ void main()
|
||||
|
||||
mem_Init();
|
||||
CursorPointer.Load(#CursorFile);
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
|
||||
if (load_dll2(libimg, #libimg_init,1)!=0) notify(LIB_IMG_LOAD_ERR);
|
||||
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify(LIB_HTTP_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libio, #libio_init,1);
|
||||
load_dll(libimg, #libimg_init,1);
|
||||
load_dll(libHTTP, #http_lib_init,1);
|
||||
Libimg_LoadImage(#skin, abspath("wv_skin.png"));
|
||||
SetSkinColors();
|
||||
|
||||
|
@ -35,7 +35,7 @@ void main()
|
||||
{
|
||||
int id, key;
|
||||
mem_Init();
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
|
||||
dict_folder = abspath(DICT_DIRECROTY);
|
||||
OpenDictionary(0);
|
||||
|
@ -49,9 +49,9 @@ void main()
|
||||
char notify_message[4296];
|
||||
|
||||
mem_Init();
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
|
||||
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify("Error: library doesn't exists - http");
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libio, #libio_init,1);
|
||||
load_dll(libHTTP, #http_lib_init,1);
|
||||
if (!URL) strcpy(#URL, "http://builds.kolibrios.org/eng/latest-iso.7z");
|
||||
address_box.size = address_box.pos = strlen(#URL);
|
||||
|
||||
|
@ -185,8 +185,8 @@ void main()
|
||||
rand_n = random(40);
|
||||
gestures.get();
|
||||
mem_Init();
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
if (load_dll2(libini, #lib_init,1)!=0) notify(LIB_INI_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libini, #lib_init,1);
|
||||
eolite_ini_path = abspath("Eolite.ini");
|
||||
LoadIniSettings();
|
||||
GetSystemDiscs();
|
||||
|
@ -1,11 +1,15 @@
|
||||
#ifndef INCLUDE_DLL_H
|
||||
#define INCLUDE_DLL_H
|
||||
|
||||
#ifndef INCLUDE_KOLIBRI_H
|
||||
#include "../lib/file_system.h"
|
||||
#endif
|
||||
|
||||
|
||||
char a_libdir[43] = "/sys/lib/\0";
|
||||
|
||||
:inline void error_init(dword text)
|
||||
{
|
||||
dword l,ll;
|
||||
dword TEXT_ERROR = malloc(1024);
|
||||
#ifdef LANG_RUS
|
||||
strcpy(TEXT_ERROR,"'Žè¨¡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ `");
|
||||
@ -14,13 +18,10 @@ char a_libdir[43] = "/sys/lib/\0";
|
||||
#else
|
||||
strcpy(TEXT_ERROR,"'Error while loading library `");
|
||||
#endif
|
||||
ll = strlen(TEXT_ERROR);
|
||||
strcpy(TEXT_ERROR+ll,text);
|
||||
l = strlen(text);
|
||||
strncpy(TEXT_ERROR+ll+l,"`' -E",4);
|
||||
strcat(TEXT_ERROR,text);
|
||||
strcat(TEXT_ERROR,"`' -E");
|
||||
notify(TEXT_ERROR);
|
||||
free(TEXT_ERROR);
|
||||
ExitProcess();
|
||||
}
|
||||
|
||||
// stdcall with 1 parameter
|
||||
@ -236,7 +237,11 @@ int load_dll2(dword dllname, import_table, byte need_init)
|
||||
return 0;
|
||||
@exit01:
|
||||
return -1;
|
||||
//error_init(dllname);
|
||||
}
|
||||
|
||||
void load_dll(dword dllname, import_table, byte need_init)
|
||||
{
|
||||
if (load_dll2(dllname, import_table, need_init)!=0) error_init(dllname);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,13 +13,6 @@
|
||||
dword boxlib = #aEdit_box_lib;
|
||||
char aEdit_box_lib[]="/sys/lib/box_lib.obj";
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define BOX_LIB_LOAD_ERR "Error while loading library /rd/1/lib/box_lib.obj"
|
||||
#else
|
||||
?define BOX_LIB_LOAD_ERR "Žè¨¡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
|
||||
#endif
|
||||
|
||||
|
||||
dword box_lib_init = #aboxlib_init;
|
||||
|
||||
dword edit_box_draw = #aEdit_box_draw;
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
dword libHTTP = #alibHTTP;
|
||||
char alibHTTP[23] = "/sys/lib/http.obj\0";
|
||||
?define LIB_HTTP_LOAD_ERR "Error while loading library /rd/1/lib/http.obj"
|
||||
|
||||
dword http_lib_init = #aLib_init;
|
||||
dword http_get = #aHTTPget;
|
||||
|
@ -23,7 +23,6 @@
|
||||
//library
|
||||
dword libimg = #alibimg;
|
||||
char alibimg[21] = "/sys/lib/libimg.obj\0";
|
||||
?define LIB_IMG_LOAD_ERR "Error while loading library /rd/1/lib/libimg.obj"
|
||||
|
||||
dword libimg_init = #alibimg_init;
|
||||
dword img_is_img = #aimg_is_img;
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
dword libini = #alibini;
|
||||
char alibini[] = "/sys/lib/libini.obj";
|
||||
?define LIB_INI_LOAD_ERR "Error while loading library /rd/1/lib/libini.obj"
|
||||
|
||||
dword lib_init = #alib_init;
|
||||
dword ini_enum_sections = #aini_enum_sections;
|
||||
|
@ -13,7 +13,6 @@
|
||||
//library
|
||||
dword libio = #alibio;
|
||||
char alibio[21] = "/sys/lib/libio.obj\0"; //"libio.obj\0";
|
||||
?define LIB_IO_LOAD_ERR "Error while loading library /rd/1/lib/libio.obj"
|
||||
|
||||
dword libio_init = #alibio_init;
|
||||
dword file_size = #afile_size;
|
||||
|
@ -102,12 +102,12 @@ char version[]=" WebView 0.1";
|
||||
void main() {
|
||||
mem_Init();
|
||||
CursorPointer.Load(#CursorFile);
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
if (load_dll2(network_lib, #network_lib_init,0)!=0) notify("Error while loading library - network.obj");
|
||||
if (load_dll2(netcode_lib, #base64_encode,0)!=0) notify("Error while loading library - netcode.obj");
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(network_lib, #network_lib_init,0);
|
||||
load_dll(netcode_lib, #base64_encode,0);
|
||||
load_dll(libio, #libio_init,1);
|
||||
load_dll(libimg, #libimg_init,1);
|
||||
if (load_dll2(iconv_lib, #iconv_open,0)!=0) { notify("Error while loading library - iconv.obj"); use_iconv=2; }
|
||||
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
|
||||
if (load_dll2(libimg, #libimg_init,1)!=0) notify(LIB_IMG_LOAD_ERR);
|
||||
OpenMailDat();
|
||||
SetEventMask(0x27);
|
||||
LoginBoxLoop();
|
||||
|
@ -42,7 +42,7 @@ void main() {
|
||||
dword id;
|
||||
|
||||
mem_Init();
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
|
||||
LoadCfg();
|
||||
|
||||
|
@ -34,8 +34,6 @@
|
||||
?define FSIZE "<EFBFBD>¥¦¨¬ ¯ ¥«¨"
|
||||
?define ASHOW "<EFBFBD>¥ áªàë¢ âì"
|
||||
?define CHANGE_POS "<EFBFBD> ¦¬¨â¥ ¨§®¡à ¦¥¨¥ ¤«ï á¬¥ë ¯®§¨æ¨¨"
|
||||
?define BOX_LIB_LOAD_ERR "<EFBFBD>訡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
|
||||
?define LIBINI_LOAD_ERR "<EFBFBD>訡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/libini.obj"
|
||||
#else
|
||||
?define WINDOW_TITLE "Taskbar and Docky configuration"
|
||||
?define TASK_FRAME_T " Taskbar "
|
||||
@ -54,8 +52,6 @@
|
||||
?define FSIZE "Full width"
|
||||
?define ASHOW "Always show"
|
||||
?define CHANGE_POS "Click on image to change position"
|
||||
?define BOX_LIB_LOAD_ERR "Error while loading library /rd/1/lib/box_lib.obj"
|
||||
?define LIBINI_LOAD_ERR "Error while loading library /rd/1/lib/libini.obj"
|
||||
#endif
|
||||
|
||||
|
||||
@ -97,8 +93,8 @@ void main()
|
||||
dword id, key;
|
||||
|
||||
mem_Init();
|
||||
if (load_dll2(libini, #lib_init,1)!=0) notify(LIBINI_LOAD_ERR);
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
|
||||
LoadCfg();
|
||||
|
||||
|
@ -78,10 +78,10 @@ void main()
|
||||
|
||||
mem_Init();
|
||||
SetEventMask(0x27);
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Error: library doesn't exists - box_lib' -E");
|
||||
if (load_dll2(libio, #libio_init,1)!=0) notify("'Error: library doesn't exists - libio' -E");
|
||||
if (load_dll2(libimg, #libimg_init,1)!=0) notify("'Error: library doesn't exists - libimg' -E");
|
||||
if (load_dll2(libini, #lib_init,1)!=0) notify("'Error: library doesn't exists - libini' -E");
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libio, #libio_init,1)!=0);
|
||||
load_dll(libimg, #libimg_init,1);
|
||||
load_dll(libini, #lib_init,1);
|
||||
|
||||
id = abspath("pixie.ini");
|
||||
strcpy(#pixie_ini_path, id);
|
||||
|
@ -65,9 +65,9 @@ void main()
|
||||
{
|
||||
dword id, key;
|
||||
mem_Init();
|
||||
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
|
||||
if (load_dll2(libimg, #libimg_init,1)!=0) notify(LIB_IMG_LOAD_ERR);
|
||||
if (load_dll2(libini, #lib_init,1)!=0) notify(LIB_INI_LOAD_ERR);
|
||||
load_dll(libio, #libio_init,1);
|
||||
load_dll(libimg, #libimg_init,1);
|
||||
load_dll(libini, #lib_init,1);
|
||||
|
||||
Libimg_LoadImage(#skin, "/sys/icons32.png");
|
||||
Libimg_FillTransparent(skin.image, skin.w, skin.h, LIST_BACKGROUND_COLOR);
|
||||
|
@ -58,11 +58,11 @@ edit_box edit_disk_size= {50,0,5,0xffffff,0x94AECE,0x000000,0xffffff,0,4,#new_di
|
||||
|
||||
void Main_Window()
|
||||
{
|
||||
word id, key, err;
|
||||
word id, key;
|
||||
int i, x;
|
||||
|
||||
mem_Init();
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
GetSizeDisk();
|
||||
edit_disk_size.left = strlen(INTRO_TEXT_4)*6 + 10;
|
||||
SetEventMask(0x27);
|
||||
|
@ -39,8 +39,8 @@ void main()
|
||||
int id, key;
|
||||
|
||||
mem_Init();
|
||||
if (load_dll2(libtruetype, #truetype, 1) != 0) notify("Error: library doesn't exists - truetype");
|
||||
if (load_dll2(Proc_lib, #OpenDialog_init,0)!=0) notify(LIB_IO_LOAD_ERR);
|
||||
load_dll(libtruetype, #truetype, 1);
|
||||
load_dll(Proc_lib, #OpenDialog_init,0);
|
||||
OpenDialog_init stdcall (#o_dialog);
|
||||
|
||||
if (param[0]) OpenFont(#param);
|
||||
|
Loading…
Reference in New Issue
Block a user