Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: разобрать секцию из ini файла 
Author Message
Worros



PostPosted: Sat Feb 14, 2009 00:52    Post subject: Reply with quote

У меня проблема
Вот такой код
Code:

char mybuffer[5];
char * toinistring;
toinistring=(char*) malloc(128);

GetWindowRect(GetParent(ListWin), &rcClient);

strcpy(toinistring,"top=");
_itoa(rcClient.top,mybuffer,10);
strcat(toinistring,mybuffer);
strcat(toinistring,"\0");
strcat(toinistring,"\r");
strcat(toinistring,"bottom=");
_itoa(rcClient.bottom,mybuffer,10);
strcat(toinistring,mybuffer);
strcat(toinistring,"\0");
strcat(toinistring,"\r");
strcat(toinistring,"left=");
_itoa(rcClient.left,mybuffer,10);
strcat(toinistring,mybuffer);
strcat(toinistring,"\0");
strcat(toinistring,"\r");
strcat(toinistring,"right=");
_itoa(rcClient.right,mybuffer,10);
strcat(toinistring,mybuffer);
strcat(toinistring,"\n");
            
WritePrivateProfileSection("MplayerPosition",toinistring,IniFileName);
free(toinistring);

по непонятной мне причине пишет в конец ini-файла мусор.

В чем моя ошибка? Как выглядит правильный вариант?
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group