You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
796 B
51 lines
796 B
/*++
|
|
|
|
Copyright (c) 1989-2001 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
smbhelper.c
|
|
|
|
Abstract:
|
|
|
|
|
|
Author:
|
|
|
|
Jiandong Ruan
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
|
|
#include "precomp.h"
|
|
|
|
void _cdecl main(void)
|
|
{
|
|
LPWSTR CommandLine;
|
|
int ch;
|
|
int num;
|
|
int Argc;
|
|
LPWSTR *Argv;
|
|
|
|
setlocale(LC_ALL, "");
|
|
|
|
SmbSetTraceRoutine(printf);
|
|
|
|
CommandLine = GetCommandLineW();
|
|
if (NULL == CommandLine) {
|
|
exit (1);
|
|
}
|
|
Argv = CommandLineToArgvW(CommandLine, &Argc);
|
|
num = 1;
|
|
if (Argc >= 2) {
|
|
num = _wtoi(Argv[1]);
|
|
}
|
|
|
|
if (SmbStartService(num, NULL) != ERROR_SUCCESS) {
|
|
exit(1);
|
|
}
|
|
do {
|
|
ch = getchar();
|
|
} while (ch != 'q' && ch != EOF);
|
|
SmbStopService(NULL);
|
|
}
|