teman2 yang baek hati,,saya mau tanya.. saya punya fungsi yang overload di dalam sebuah file DLL,, fungsi itu sudah saya export sbb:
fungsi:
Code:
function GetErrorMsg(errcode:Integer; strParam:string) : PChar; stdcall; overload;
var strMsg:string;
begin
if (errcode = 1) then
begin
strMsg := 'Failed to upload file: ID0005 File already uploaded.';
//Result := PCHAR(strMsg);
end
else if (errcode = 2) then
begin
strMsg := DateToStr(Now)+' Unable to upload Security ID: '+strParam+' Because Security ID is not available at Security Standing Data.';
//Result := PCHAR(strMsg);
end
else if (errcode = 3) then
begin
strMsg := DateToStr(Now)+' Unable to upload Subclient ID: '+strParam+' Because Subclient ID is not available at Subclient Standing Data.';
//Result := PCHAR(strMsg);
end
else if (errcode = 4) then
begin
strMsg := DateToStr(Now)+' Unable to upload Client Name of Client ID: '+strParam+' Because Client ID is not available at Client Standing Data.';
//Result := PCHAR(strMsg);
end;
Result := PCHAR(strMsg);
end;
function GetErrorMsg(errcode:Integer; strParam:string; fileName:string; row:Integer) : PChar; stdcall; overload;
var strMsg:string;
begin
if (errcode = 1) then
begin
strMsg := 'Failed to upload file: Tes.xls Data Line: 360 Because security ID: ID0005 is not available at Security Standing Data.';
//Result := PCHAR(strMsg);
end
else if (errcode = 2) then
begin
strMsg := DateToStr(Now)+' Failed to upload file: '+fileName+' Data Line: '+IntToStr(row)+' Because subclient ID: '+strParam+' is not available at Subclient Standing Data.';
//Result := PCHAR(strMsg);
end
else if (errcode = 3) then
begin
strMsg := DateToStr(Now)+' Failed to upload file: '+fileName+' Data Line: '+IntToStr(row)+' Security Type of Security ID: '+strParam+' is not SUN or SBI.';
//Result := PCHAR(strMsg);
end
else if (errcode = 4) then
begin
strMsg := DateToStr(Now)+' Failed to upload file: '+fileName+' Data Line: '+IntToStr(row)+' Security Type of Security ID: '+strParam+' is not available at Security Standing Data.';
//Result := PCHAR(strMsg);
end
else if (errcode = 5) then
begin
strMsg := DateToStr(Now)+' Failed to upload file: '+fileName+' Data Line: '+IntToStr(row)+' Subclient ID: '+strParam+' is not available at Subclient Standing Data.';
//Result := PCHAR(strMsg);
end;
Result := PCHAR(strMsg);
end;
export
Code:
export
GetErrorMsg(errcode:Integer; strParam:string),
GetErrorMsg(errcode:Integer; strParam:string; fileName:string; row:Integer);
tetapi ketika fungsi itu dipanggil di project lain,,salah satunya tidak bekerja..ada yang bisa bantu??
thx |