Rekan-rekan sekalian,
Saya coba bikin file dll sederhana.
Terus ketika saya panggil file dll tersebut di modul yang saya buat,
hasilnya juga berhasil/muncul.
Tapi yang menjadi pertanyaan saya yang membuat saya bingung selalu muncul
message error 'Invalid Pointer Operation'.
Setelah saya debugging pun errornya itu nggak menunjuk ke baris program
tertentu.
Sebelumnya saya ucapkan terima kasih.
Berikut listting programnya.
{Ini File Dllnya coba.dll}
library Coba;
uses
SysUtils,
Classes;
Function NamaHari(Tgl :TDateTime):String; Export;
Begin
case DayOfWeek(Tgl) of
1 : Result:= 'Minggu';
2 : Result:= 'Senin';
3 : Result:= 'Selasa';
4 : Result:= 'Rabu';
5 : Result:= 'Kamis';
6 : Result:= 'Jum''at';
7 : Result:= 'Sabtu';
end;
End;
Exports NamaHari;
begin
end.
{Ini Form Yang untuk memanggil file dll tersebut }
unit Form1;
interface
uses
Windows, ...;
Type ...
implementation
{$R *.dfm}
Function NamaHari(Tgl:TDateTime):String;Far;External 'coba';
procedure TForm1.Button1Click(Sender: TObject);
Var
begin
MessageDlg(Namahari(Now),mtWarning,[MBOK],0);
end;
end.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->
Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/