this did the trick
int iRc = 1;
HKEY hKey = NULL;
if(argc == 2)
{
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\lanmanserver\\Shares", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
char szDescription[2048];
DWORD dwSize = sizeof(szDescription)...