Int_GetKeyString, Int_GetKeyValue, Int_SetKeyString, Int_SetKeyValue
Description
INT Int_GetKeyString( char *Int_Filename, char *int_section, char *int_key, char *int_buffer, intint_maxlength);
This function retrieves a string from the specified section in the specified file and stores it in a buffer.
Parameters
//Int_GetKeyString example - this example manages user libraries.
char filename[256],section[256],key[256],buf[2048];
char caption[256],out[4096],library[256];
int retval,qw,xs,ys,w,h;
strcpy(caption,"API Example - Int_GetKeyString function");
Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100);
Get_Size(SIZE_PICWND,&xs,&ys,&w,&h);
strcpy(section,"User");
strcpy(key,"load");
Get_Filename(FILE_CONFIG,filename);
again:
qw=Int_Question("API","Select action:","Check for user libraries","Add new library","Edit inifile","Exit",1,0);
if(qw==1)
{
Int_GetKeyString(filename,section,key,buf,2048);
sprintf(out,"You are currently using these libraries:\n\n%s","buf");
Int_CreateWindow(WND_1,"API",WP_TOPLEFT,0,0,w,(h/4)-5,out,1,1,0.00000,1,1,1,"Arial,B,9");
}
if(qw==2)
{
Int_GetKeyString(filename,section,key,buf,2048);
Int_SetWindowState(WND_1,WS_DESTROY);
retval = SelectFile(library, "Aplication extensions|*.dll", FALSE);
if(retval == FALSE) goto again;
if(strcmp(buf,""))
sprintf(out,"%s,%s","buf,library");
else
strcpy(out,library);
Int_SetKeyString(filename,section,key,out);
Int_Query("API Example","\n Please, reboot the application to apply changes. \n","OK");
while(!Int_QueryPressed);
}
if(qw==3)
{
Int_SetWindowState(WND_1,WS_DESTROY);
EditFile(filename);
}
if(qw==4)
goto end;
goto again;
end:
Int_SetWindowState(WND_1,WS_DESTROY);
Int_CloseTextWindow();
See Also
Int_GetKeyValue, Int_SetKeyValue, Int_SetKeyString
Description
double Int_GetKeyValue( char *Int_Filename, char *int_section, char *int_key, char *int_defaultvalue);
This function retrieves a value of the specified key from the specified section in the specified file.
Parameters
See Also
Int_SetKeyValue, Int_GetKeyString, Int_SetKeyString
Description
INT Int_SetKeyString( char *Int_Filename, char *int_section, char *int_key, char *int_buffer);
This function copies a character string into the specified key of the specified section in the specified file.
Parameters
See Also
Int_GetKeyString, Int_GetKeyValue, Int_SetKeyValue
Description
INT Int_SetKeyValue( char *Int_Filename, char *int_section, char *int_key, char *int_defaultvalue);
This function copies a value into the specified key of the specified section in the specified file.
Parameters
See Also
Int_GetKeyValue, Int_SetKeyString, Int_GetKeyString