|
|
|
#include <stdio.h>
|
|
|
|
#include <tchar.h>
|
|
|
|
|
|
|
|
#include "server.h"
|
|
|
|
|
|
|
|
int _tmain(int argc, TCHAR *argv[]) {
|
|
|
|
if (argc == 2) {
|
|
|
|
// TODO: implement client
|
|
|
|
if (lstrcmpi(argv[1], TEXT("-c")) == 0) {
|
|
|
|
// StartShellClient();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else if (lstrcmpi(argv[1], TEXT("-s")) == 0) {
|
|
|
|
StartShellServer();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
goto help_message;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else if (argc == 3) {
|
|
|
|
// TODO: implement service
|
|
|
|
if (lstrcmpi(argv[1], TEXT("-s")) == 0 && lstrcmpi(argv[2], TEXT("-service")) == 0) {
|
|
|
|
// CreateService
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
goto help_message;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
goto help_message;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
help_message:
|
|
|
|
printf("Wrong usage\nUsage: %s [-c | -s [-service]]\n", argv[0]);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|