extern char *optarg; // this is from the header of xgetopt.h
_TCHAR localdir[_MAX_PATH];
GetModuleFileName(NULL,localdir,sizeof(localdir));// a default value for localdir
// from inside the function
USES_CONVERSION;
localdir = A2T(optarg); //replace with user input