wsprintf(szKey, "Software\\%s\\%s\\%s", sgProduct.szCompanyName, sgProduct.szProductName, sgProduct.szUserAgent); GetWinReg(HKEY_LOCAL_MACHINE, szKey, "Setup State", szBuf, sizeof(szBuf)); if(lstrcmpi(szBuf, "downloading") == 0) bRv = TRUE;
if(sgProduct.szCompanyName && sgProduct.szProductName && sgProduct.szUserAgent) { wsprintf(szKey, "Software\\%s\\%s\\%s", sgProduct.szCompanyName, sgProduct.szProductName, sgProduct.szUserAgent); GetWinReg(HKEY_LOCAL_MACHINE, szKey, "Setup State", szBuf, sizeof(szBuf)); if(lstrcmpi(szBuf, "downloading") == 0) bRv = TRUE; }
BOOL CheckForPreviousUnfinishedDownload(){  char szBuf[MAX_BUF_TINY];  char szKey[MAX_BUF_TINY];  BOOL bRv = FALSE;  wsprintf(szKey, "Software\\%s\\%s\\%s", sgProduct.szCompanyName, sgProduct.szProductName, sgProduct.szUserAgent);  GetWinReg(HKEY_LOCAL_MACHINE, szKey, "Setup State", szBuf, sizeof(szBuf));  if(lstrcmpi(szBuf, "downloading") == 0)    bRv = TRUE;  return(bRv);}