Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF ... What do YOU do?
Message
From
10/04/2006 12:11:16
 
 
To
10/04/2006 11:43:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01110792
Message ID:
01112050
Views:
24
>>>Then I found the culprit - the section names in the ini file. For a while I was using chrtran(sys(1272,toObj), ".", "_"), but then I forgot the chrtran() in the font saving routine, and started getting both [formname.pageframe.page1.text1] and [formname_pageframe_page1_text1]. The recent version uses the former only. When I deleted the ini file, the new file didn't have any sections with underscores anymore... so that was it. I wrote a little routine which removes those sections, to purge the existing ini file in production, and voila, it all works.
>>>
>>>So, for you two guys, did I run into a bug, or just a limitation, or was I just sloppy? If it's a bug, is it a VFP bug or Windows API bug?
>>
>>Well, if you forgot the chrtran() in the font saving routine and ended up with sections that had the underscores - don't see how VFP or Windows can be to blame for that. Would of been nice if you would of got something a little more specific that the infamous c00005 error though.
>
>That's not the point - I had two sets of sections, one with dots and one without underscores. Now getprivateprofilestring should use only the one I pass as the parameter and shoudln't care if there's any other section, similar or not. Which it actually did for a while. Somehow I've pushed it to a tipping point where it was too much for this API. And the size of the ini was 20K when it was most bloated - nowhere near any magical number like 32K or 64K.
>
>And, mind you, getprivateprofilestring is not a recent invention by any means - it's at least 15 years old.

So, you did find a bug or limitation that only showed up because you were somewhat sloppy. And the quest is: who is to blame.

If the limitation is not documented, then it's at the least a flaw in the documentation. In this case the bug/limitation is not within vfp, but applies to a windows-api.

Were you sloppy? Does that really matter? I think you were confronted with a flaw in the api and that api therefore needs either a repair of the routine or of the documentation.

What I did lately, was (try to) make the people here aware of a finding. See Re: Is Word/Excel installed Thread #566415 Message #1082252
In that case I have not posted a report to MS, because I think that the finding was not their fault. But I felt an obligation to report it to the community, knowing that this routine is widely used.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform