-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.c
26 lines (22 loc) · 818 Bytes
/
test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*************************************************************************
> File Name: test.c
> Author: wht
> Mail: [email protected]
> Created Time: 2016年06月17日 星期五 10时42分21秒
************************************************************************/
#include<stdio.h>
#include <stdlib.h>
#include "config.h"
int main(int argc, char **argv)
{
const char *file = "./config.ini";
char value[1024] = "xxxxxxxxxxxxxxxxxxxxx";
char *valueNew = "xxxxxxx";
if (ReadPrivateProfileString(file, "session2", "key3", value, 1024))
printf("value = %s\n", value);
if (RevisePrivateProfileString(file, "session2", "key3", valueNew))
printf("valueNew = %s\n", valueNew);
if (ReadPrivateProfileString(file, "session2", "key3", value, 1024))
printf("value = %s\n", value);
return 0;
}