I want to read a value from registry using the following method:
char* cDriveStatus=ReadFromRegistry(HKEY_CURRENT_USER,_T(NDSPATH),m_szDriveName);
I tried converting using GetBuffer,m_szDriveName.GetBuffer(0)
but this again shows error:
error C2664: cannot convert parameter 3 from 'wchar_t *' to 'LPSTR'
Edit: Declaration of Method and variable is below:
char* ReadFromRegistry(HKEY,LPCTSTR,LPSTR);
CString m_szDriveName;