[fpc-pascal] Mozilla XPCOM

José Mejuto joshyfun at gmail.com
Thu Jun 3 13:20:20 CEST 2010


Hello FPC-Pascal,

Thursday, June 3, 2010, 8:55:47 AM, you wrote:

MVC> Are you cooperating with Phil on this ?

Just to keep the message in thread, I re-answer this message.

After a bit more debugging I found something strange (again it could
be fpc related or not, I'm not sure). This is the firs lines of
definition of nsIFile interface:

---------------------------------------
  nsIFile = interface(nsISupports)
  ['{c8c0a080-0868-11d3-915f-d9d889d48e3c}']
    procedure Append(const node: nsAString); safecall;
    procedure AppendNative(const node: nsACString); safecall;
    procedure Normalize(); safecall;
    procedure Create(_type: PRUint32; permissions: PRUint32); safecall;
    procedure GetLeafName(aLeafName: nsAString); safecall;
    procedure SetLeafName(const aLeafName: nsAString); safecall;
    procedure GetNativeLeafName(aNativeLeafName: nsACString); safecall;
    procedure SetNativeLeafName(const aNativeLeafName: nsACString); safecall;
    procedure CopyTo(newParentDir: nsIFile; const newName: nsAString); safecall;
    procedure CopyToNative(newParentDir: nsIFile; const newName: nsACString); safecall;
    procedure CopyToFollowingLinks(newParentDir: nsIFile; const newName: nsAString); safecall;
    procedure CopyToFollowingLinksNative(newParentDir: nsIFile; const newName: nsACString); safecall;
    procedure MoveTo(newParentDir: nsIFile; const newName: nsAString); safecall;
    procedure MoveToNative(newParentDir: nsIFile; const newName: nsACString); safecall;
    procedure Remove(recursive: PRBool); safecall;
    function GetPermissions(): PRUint32; safecall;
---------------------------------------
    
All "procedure" works like "GetLeafName" or "Remove", but functions,
all of them return some kind of "COM error" like "$80004003" or
"$80070057" in example in the "GetPermissions" or "GetFileSize". Does
this could be related to a different handling of procedure and
function ? Is there any kind of manual test that I can perform to
detect if the problem is located in fpc ?

-- 
Best regards,
 José




More information about the fpc-pascal mailing list