Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > In C/Linux program How to open microsoft office outlook configurationfile

Reply
Thread Tools

In C/Linux program How to open microsoft office outlook configurationfile

 
 
Lakshmi Sreekanth
Guest
Posts: n/a
 
      05-20-2010
Hi All,

I am trying to open a Microsoft office outlook configuration file. But
I am not be able to open that file. The name of the file: PMST.

I'm getting this error:
#ERROR# File :/PERM/PLAIN/PMST cannot be opened
#ERROR# FILE:/PERM/PLAIN/PMST does not exists in the device

Pls tell me whether we need to give any file type after the file name.

Check the code:
---------------------------------------------
file = fopen( fileName, "r" );
if ( file )
{
/* File exists, close it */

if ( FALSE == file_close( &file ) )
{
Error(("file_exists: fclose failed for %s", fileName ));
return FALSE;
}
}
Error(( "File :%s cannot be opened", fileName ));
-----------------------------------------------------

BR
Lakshmi Sreekanth
 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      05-20-2010
On 20 May, 07:17, Lakshmi Sreekanth <(E-Mail Removed)> wrote:
> Hi All,
>
> I am trying to open a Microsoft office outlook configuration file. But
> I am not be able to open that file. The name of the file: *PMST.
>
> I'm getting this error:
> *#ERROR# File :/PERM/PLAIN/PMST cannot be opened
> *#ERROR# FILE:/PERM/PLAIN/PMST does not exists in the device
>
> Pls tell me whether we need to give any file type after the file name.
>
> Check the code:
> ---------------------------------------------
> * file = fopen( fileName, "r" );
> * * if ( file )
> * * * * {
> * * * * /* File exists, close it */
>
> * * * * if ( FALSE == file_close( &file ) )
> * * * * * * {
> * * * * * * Error(("file_exists: fclose failed for %s", fileName ));
> * * * * * * return FALSE;
> * * * * * * }
> * * * * *}
> * Error(( "File :%s cannot be opened", fileName ));
> * * * -----------------------------------------------------


sounds like the file doesn't exist...
you probably want to re-ask this question on a platform (Linux?)
specific new group



 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      05-20-2010
Lakshmi Sreekanth <(E-Mail Removed)> writes:

> I am trying to open a Microsoft office outlook configuration file. But
> I am not be able to open that file. The name of the file: PMST.
>
> I'm getting this error:
> #ERROR# File :/PERM/PLAIN/PMST cannot be opened
> #ERROR# FILE:/PERM/PLAIN/PMST does not exists in the device
>
> Pls tell me whether we need to give any file type after the file name.


If your are referring to what is often called the file name
extension then, yes, you have to include that because it is part of the
name.

> Check the code:
> ---------------------------------------------
> file = fopen( fileName, "r" );
> if ( file )
> {
> /* File exists, close it */
>
> if ( FALSE == file_close( &file ) )
> {
> Error(("file_exists: fclose failed for %s", fileName ));
> return FALSE;
> }
> }
> Error(( "File :%s cannot be opened", fileName ));


There may be no problem. This line is probably reached (and will give
you an error message) when the file is opened and closed successfully.
Maybe you intended to have a else clause here? I say "probably" because
file_close could do all kinds of unknown things including calling 'exit'.

By the way, writing

if (FALSE == file_close(...))

is a bad idea. If FALSE is 0 (as it should be) then you should just
write

if (!file_close(...))

If FALSE is not 0, then you need to fix that first!

--
Ben.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Microsoft Office Excell 2003 & Microsoft Office Word 2003 Angel Eyes Microsoft Certification 2 06-30-2008 09:28 PM
How do I get my default email program to remain Microsoft Outlook Express and not keep changing on it's own to Microsoft Outlook? Yahweh Computer Support 2 01-25-2005 01:04 AM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM
How to create a simple configurationfile parser? Jesper N?hr C Programming 1 02-26-2004 01:02 PM



Advertisments