problem with NS_NewNativeLocalFile API

"Ramandeep Singh, Noida" <[email protected]> Thu, 17 Mar 2005 09:27:11 +0530
Newsgroups gmane.comp.mozilla.crash-data
Message-ID <267988DEACEC5A4D86D5FCD780313FBB05BD0FF7@exch-03.noida.hcltech.com>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C52AA5.65DEA3F8
Content-Type: text/plain

Hi,


I am using API NS_NewNativeLocalFile
which contaiins following lines of code. Also I build source of firefox in
my Linux with gcc -3.3.3 and using firefox (libraries -0.9.3)
Also VSTR_GetStr(envPath)) returns path /home/oie/mozilla/dist/lib path
Here is my code:


nsresult my;
nsCOMPtr<nsILocalFile> binDir;

my=NS_NewNativeLocalFile(nsDependentCString(VSTR_GetStr(envPath)),
BOOL_TRUE, getter_AddRefs(binDir));

if(NS_SUCCEEDED(my))
     printf("\n Successfully Executed 111:");
else
     printf("\n Can't Execute 111:");


Output always returns "NoSucessfully Excute 111"

What's wrong in my code.

Waiting for your reply!!!!!!!

please help!!!

 

Regards,

Ramandeep Singh

 

 

 



Disclaimer: 

This message and any attachment(s) contained here are information that is
confidential,proprietary to HCL Technologies and its customers, privileged
or otherwise protected by law.The information is solely intended for the
individual or the entity it is addressed to. If you are not the intended
recipient of this message, you are not authorized to read, forward,
print,retain, copy or disseminate this message or any part of it. If you
have received this e-mail in error, please notify the sender immediately by
return e-mail and delete it from your computer.



------_=_NextPart_001_01C52AA5.65DEA3F8
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'>Hi,<br>
<br>
<br>
I am using API <b><span =
style=3D'font-weight:bold'>NS_NewNativeLocalFile</span></b><br>
which contaiins following lines of code. Also I build source of firefox =
in my
Linux with gcc -3.3.3 and using firefox (libraries -0.9.3)<br>
Also VSTR_GetStr(envPath)) returns path /home/oie/mozilla/dist/lib =
path<br>
Here is my code:<br>
<br>
<br>
<b><span style=3D'font-weight:bold'>nsresult my;<br>
nsCOMPtr&lt;nsILocalFile&gt; binDir;<br>
<br>
my=3DNS_NewNativeLocalFile(nsDependentCString(VSTR_GetStr(envPath)), =
BOOL_TRUE,
getter_AddRefs(binDir));<br>
<br>
if(NS_SUCCEEDED(my))<br>
&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;\n Successfully Executed =
111:&quot;);<br>
else<br>
&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;\n Can&#8217;t Execute =
111:&quot;);<br>
</span></b><br>
<br>
Output always returns &quot;NoSucessfully Excute 111&quot;<br>
<br>
What's wrong in my code.<br>
<br>
Waiting for your reply!!!!!!!<br>
<br>
please help!!!</span></font><font size=3D2 face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Regards,</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Ramandeep Singh<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;</span><o:p></o:p></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>
<BR>
<BR>

<P><B><FONT SIZE=3D2 FACE=3D"Arial">Disclaimer:</FONT></B> </P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">This message and any attachment(s) =
contained here are information that is confidential,proprietary to HCL =
Technologies and its customers, privileged or otherwise protected by =
law.The information is solely intended for the individual or the entity =
it is addressed to. If you are not the intended recipient of this =
message, you are not authorized to read, forward, print,retain, copy or =
disseminate this message or any part of it. If you have received this =
e-mail in error, please notify the sender immediately by return e-mail =
and delete it from your computer.</FONT></P>
<BR>
<BR>

------_=_NextPart_001_01C52AA5.65DEA3F8--