I have a C application that does this features:
- being called by an Internet protocol (syntax: gett:test!test123!456 ).
- reads a file and parse it (the file will be exactly on the same folder as the exe and name is defined.
- parses the syntax I wrote previously (takes test!test123!456 as argv) and parse it
- calls another application with the parsed arguments (from above)
I have successfuly make the features. Otherwise, the only problem (currently) is: when I call the application from another location or application (e.g cmd), the application seems to be losing the file defined above. the exception handler for this, in my code is:
/// open the config.txt module
FILE *f;
f=fopen("configgg.txt", "r");
if (f == 0) { /* If opening failed */
MessageBox(NULL, "Failed in opening file. Make sure you have the config.txt", "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}
Can anyone help me with this problem?
Sorry for the broken language. Thank you in advance, I appreciate any sort of help.