I migrated the code from C++ to VS C++.Net.
I got following error.
u.ui2_local = (char *) wcsLocal;
u.ui2_remote = (char *) wcsRemote;
error C2440: '=' : cannot convert from 'char *' to 'LPWSTR' for both.
rc = NetUseDel(NULL, (char *) wcsPath, lForce ? USE_LOTS_OF_FORCE : USE_NOFORCE);
error C2664: 'NetUseDel' : cannot convert parameter 2 from 'char *' to 'LPWSTR'
I tried removing (char *)
and it works fine. I am using VS 2010. I am a newbie in Win C++.
I am not sure as removing (char *)
will still produce correct output. The project is big and i can't test by removing it and running the app to see the output.
Please Advise.
Thanks