SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jul 2004
    Location
    Chennai,India
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    memory access violation while using printf


  2. #2
    Member
    Join Date
    Sep 2003
    Location
    Cleveland, Oh
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: memory access violation while using printf

    Try this...

    fp = fopen("C:\\logfile.txt","a");


    Thanks,
    Jacqui
    1. 9.10
    2. HTTP
    3. HTML-Advanced
    4. Concurrent Groups
    5. LR91P026 QFE
    6. New
    7. All protocols - 3500 Vusers
    8. Yes
    9. Windows 2003 SP2
    10. No

  3. #3
    Junior Member
    Join Date
    Dec 2004
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: memory access violation while using printf

    Originally posted by devvi_v:
    1103204115.txt
    <font size="2" face="Verdana, Arial, Helvetica">see this:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> long *fp = 0;
    char *filename = &quot;C:\\logfile.txt&quot;;

    if(fopen(filename, &quot;a&quot != NULL)
    {
    web_reg_find(&quot;Text=System:&quot;, &quot;Fail=NotFound&quot;, &quot;Search=Body&quot;, LAST);
    web_reg_save_param(&quot;SystemId&quot;, &quot;LB=System:&quot;, &quot;RB=&lt;img&quot;,&quot;Search=Body&quot;, LAST);
    web_url(&quot;www.tripmanager.com&quot;,...LAST);
    fprintf(fp, &quot;%s&quot;, lr_eval_string(&quot;{SystemId}&quot);
    fclose(fp);
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  4. #4
    Junior Member
    Join Date
    Jul 2004
    Location
    Chennai,India
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: memory access violation while using printf

    the problem is solved now , i have missed to include a pair of braces in fopen statement
    if((fp=fopen(file_stream,"a+"))==NULL){
    lr_output_message("cannot open logfile.txt");
    }
    else{
    lr_output_message("file open success");
    }

    this works fine, previously it was
    if(fp=fopen(file_stream,"a")==NULL){

  5. #5
    Junior Member
    Join Date
    Jul 2004
    Location
    Chennai,India
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: memory access violation while using printf

    continuation to prev msg

    the statement assigns null value to fp and hence didnt work

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:03 AM.

Copyright BetaSoft Inc.