كيف كتابة دالة بسيطة في مكتبة dll واستدعائها من برنامجي
#1
بسم الله الرحمن الرحيم
عندى مشكلة عند كومبيل لكتابة دالة الكود بالكامل
كود :
library test; { Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. This applies to all strings passed to and from your DLL--even those that are nested in records and classes. ShareMem is the interface unit to the BORLNDMM.DLL shared memory manager, which must be deployed along with your DLL. To avoid using BORLNDMM.DLL, pass string information using PChar or ShortString parameters. } uses SysUtils, Classes, dialogs; {$R *.res} procedure bsp-msg(caption :string);stdcall;export; begin ShowMessage(caption); End; exports bsp-msg; begin end.
الخطأ هنا
procedure bsp-msg(caption Confusedtring);stdcall;export;
تفاصيل[COLOR="red"]
[Error] test.dpr(19): ';' expected but '-' found
[Error] test.dpr(21): Undeclared identifier: 'caption'
[Error] test.dpr(24): ',' or ';' expected but '-' found
[/COLOR]
والبروجيكت فى المرفقات


الملفات المرفقة
.rar   dll.rar (الحجم : 2.28 ك ب / التحميلات : 13)
الرد


الردود في هذا الموضوع
كيف كتابة دالة بسيطة في مكتبة dll واستدعائها من برنامجي - بواسطة karika2 - 30-04-2014, 03:56 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم