dehghanimeh
دوشنبه 21 بهمن 1387, 22:27 عصر
با سلام
من دارم یه dll میسازم که داخل تمام محیط های برنامه نویسی قابل لود باشه
تاحالا توی محیط های زیادی امتحانش کردم که جواب داده
ولی توی access , vb اصلا باز نمیشه
همه جوره امتحانش کردم
توابع با حالات مختلف
extern "C" __declspec(dllexport) __cdecl int myadd1(int x, int y)
{
return (x+y);
}
extern "C" __declspec(dllexport) __stdcall int myadd2(int x, int y)
{
return (x+y);
}
صدا زدن توابع
Private Declare Function myadd1 Lib "test.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
Private Declare Function myadd1 CDecl Lib "test.dll" (ByVal x As Integer, ByVal y As Integer) As Intege
خطا ها
---------------------------
Project1
---------------------------
Run-time error '453':
Can't find DLL entry point myadd1 in test.dll
---------------------------
OK
---------------------------
---------------------------
Project1
---------------------------
Run-time error '49':
Bad DLL calling convention
---------------------------
OK
---------------------------
:اشتباه:
مخم داره سوت میکشه
من دارم یه dll میسازم که داخل تمام محیط های برنامه نویسی قابل لود باشه
تاحالا توی محیط های زیادی امتحانش کردم که جواب داده
ولی توی access , vb اصلا باز نمیشه
همه جوره امتحانش کردم
توابع با حالات مختلف
extern "C" __declspec(dllexport) __cdecl int myadd1(int x, int y)
{
return (x+y);
}
extern "C" __declspec(dllexport) __stdcall int myadd2(int x, int y)
{
return (x+y);
}
صدا زدن توابع
Private Declare Function myadd1 Lib "test.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
Private Declare Function myadd1 CDecl Lib "test.dll" (ByVal x As Integer, ByVal y As Integer) As Intege
خطا ها
---------------------------
Project1
---------------------------
Run-time error '453':
Can't find DLL entry point myadd1 in test.dll
---------------------------
OK
---------------------------
---------------------------
Project1
---------------------------
Run-time error '49':
Bad DLL calling convention
---------------------------
OK
---------------------------
:اشتباه:
مخم داره سوت میکشه