Announcement

Collapse
No announcement yet.

WritePivateProfile string length

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WritePivateProfile string length

    Is there any limit to the length of string I am writing to an INI file?

    I would prefer to do it that way vs using my own file type.
    I have two entries that need to be read, and written, and one of them is a warning text (For Winlogon Message)...

    I can write the file just fine, rather long, but when I read it all I get is "The" and that's it, but it sh ould start "The computer system you are about to enter.."

    Frustrated...
    Seems to me WritePrivateProfileString and GetPrivateProfileString are dinsosauric....

    ------------------
    Scott
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    scott,

    i don't think there is a limit, maybe a problem elsewhere?

    i do know, however, that ini files...
    • are limited to 64k file size.
    • cannot contain any cr\linefeed when being written to.
    • are locked when accessed by a program.



    i posted some pb-friendly routines here...

    http://www.powerbasic.com/support/pb...ad.php?t=22563


    regards,

    ------------------
    kev g peel
    kgp software, bridgwater, uk.
    mailto:[email protected][email protected]</a>

    [this message has been edited by kev peel (edited august 07, 2001).]
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Well it's q uite long, like 1024, so that explains it....
      And, I'm using the "|" instead of $CRLF, then switch it back when read...
      I'll have to come up with another routine I think....easy enough to write two files....


      ------------------
      Scott
      Scott Turchin
      MCSE, MCP+I
      http://www.tngbbs.com
      ----------------------
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

      Comment


      • #4
        Check out http://support.microsoft.com/support.../Q230/1/94.ASP


        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment

        Working...
        X