TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Doug Glenn
date: 1995-04-24 20:17:40
subject: Newbie code part 2

Hello All!

    Thanks in advance for all answers/critisism of the previous code
    fragment. I did manage to figure out where I was going wrong,
    ie: HAB HAB and so on, it dawned on me that in actuality(correct
    me if I'm wrong), that it was assigning the lower case to the
    upper case call in the libraries. So I am now getting 1, or true
    on all function calls...... except for the puzzler... which is
    the following line(s):

strcpy(PSZAPP,"fis");
strcpy(PSZKEY,"prog_1");
test = PrfQueryProfileSize(hini, PSZAPP, PSZKEY, &PDATALEN);
printf("\nThe return code is %d", test);

    Its my understanding, that this should place in 'test' the byte
    size of the key "prog_1". What it is doing is returning 1....
    whereas the key for that is "c:\test\blah blah"(not the actual
    key, but don't make me look it up ), somewhat larger than two
    bytes, it should be more along the order of a byte per char
    stored.  Using IMPD, all it shows recieveing is one. Now if I
    look at the value for PDataLen, it shows 18, which is more what
    I would have expected. However in the example code in PMREF, it
    states the assignment is supposed to have the value. But we're
    talking about the same reference that shows in the syntax:
    rc=PrfQueryProfileSize(hini, PszApp, PszKey, PDataLen) vs
    rc=PrfQueryProfileSize(hini, PszApp, PszKey, &PDataLen) in the
    example code snippet. Note the & in the example which is missing
    in the syntax. (Oh what fun.)

    Any ideas?

Later!

 * WCE 2.01á4/2227 * It's a great place, and the drinks are cold!

--- WILDMAIL!/WC v4.12 
* Origin: The Programmers FORUM! 704-873-4282 (1:379/1102.0)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 379/1102 1107 1 3615/50 396/1 270/101 105/103 42 712/515 711/808 809
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.