#include #include #include "server.h" int _tmain(int argc, char *argv[]) { if (argc == 2) { if (lstrcmpi(argv[1], TEXT("-s")) == 0) { StartShellServer(); return 0; } else { goto help_message; } } else if (argc == 3) { if (lstrcmpi(argv[1], TEXT("-c")) == 0) { StartShellClient(argv[2]); return 0; } // TODO: implement service else 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 {remote ip} | -s [-service]]\n", argv[0]); return -1; }