|
-
July 14th, 2005, 01:22 PM
#1
MultiByteToWideChar() & NetShareCheck()
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|