Hi there,

I would like to check some share info of remote machine's using the NetShareCheck function. It's all working fine as long as I declare a wmain function and call the NetShareCheck with the console parameters (argv[x]).

I would like to use this function within a normal main function and without using the console parameters. I've tried using the MultiByteToWideChar() function for conversion of normal char's to UNICODE. unfortunatly it doesn't work..

///////////////////////////////
LPCSTR szServer = "192.168.2.152";
LPWSTR lpWideCharStr;

MultiByteToWideChar(CP_ACP, 0, szServer, sizeof(szServer), lpWideCharStr, sizeof(lpWideCharStr));

res = NetShareCheck(lpWideCharStr, argv[2],&devType);
//////////////////////////////

any one suggestions or some sample code?

Thanks a lot!