我是DELPHI的初学者,我有一个问题.. 如何调用此函数并使用它,我想在标签中显示结果,以及如何以正确的方式声明函数,非常感谢提前。
function FindFileSize(Filename:string):integer;
var
sr : TSearchRec;
begin
if FindFirst(filename,faAnyFile-faDirectory,sr) = 0 then
Result := sr.Size
else
raise EFileNotFoundException.Create(filename+' not found.');
FindClose(sr);
end;
答案 0 :(得分:0)
尝试这样的事情:
Process: com.fourlines.gmailapi, PID: 8270
java.lang.NoClassDefFoundError: com.sun.mail.util.MailLogger
at javax.mail.Session.initLogger(Session.java:226)
at javax.mail.Session.<init>(Session.java:210)
at javax.mail.Session.getDefaultInstance(Session.java:321)
at com.fourlines.gmailapi.SendMailCtrl.createEmail(SendMailCtrl.java:80)
at com.fourlines.gmailapi.ViewEmailActivity.onCreate(ViewEmailActivity.java:68)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2166)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2252)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)