Ignore:
Timestamp:
Feb 14, 2025, 11:21:23 PM (6 months ago)
Author:
gyoung
Message:

Get cddb working again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mediafolder/c/cddb/pmcddb.cpp

    r142 r211  
    145145  startData.FgBg=SSF_FGBG_BACK;
    146146  startData.TraceOpt=SSF_TRACEOPT_NONE;
    147   startData.PgmTitle=(char*)pszTitle;
     147  startData.PgmTitle=(PSZ)pszTitle;
    148148 
    149   startData.PgmName=(char*)"cmd.exe";
     149  startData.PgmName=(PSZ)"cmd.exe";
    150150  startData.InheritOpt=SSF_INHERTOPT_SHELL;
    151151  startData.SessionType=SSF_TYPE_WINDOWABLEVIO;
     
    155155  startData.InitXSize=500;
    156156  startData.InitYSize=400;
    157   startData.ObjectBuffer=(char*)chrLoadError;
     157  startData.ObjectBuffer=(PSZ)chrLoadError;
    158158  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
    159159
    160160  sprintf(startParams," /C \" \"%s\" %s \"", rexxFile, parameters);
    161   startData.PgmInputs=(CHAR*)startParams;
     161  startData.PgmInputs=(PSZ)startParams;
    162162
    163163  writeLog("Trying to start ");
     
    191191  sprintf(profileName,"%s\\cddb.ini", chrInstallDir);       
    192192  /* Open ini-file */
    193   hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(char *)profileName);
     193  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(PCSZ)profileName);
    194194  do{
    195195    if(!hini) {
     
    204204    }/* end of if(!hini) */
    205205
    206     NUMSERVERS=PrfQueryProfileInt(hini,(char*)"cddb",(char*)"numservers",0);
    207     PrfQueryProfileString(hini,(char*)"cddb",(char*)"cddbuser",(char*) "guest",username,sizeof(username));
    208     PrfQueryProfileString(hini,(char*)"cddb",(char*)"cddbuserhost",(char*) "",hostname,sizeof(hostname));
     206    NUMSERVERS=PrfQueryProfileInt(hini,(PCSZ)"cddb",(PCSZ)"numservers",0);
     207    PrfQueryProfileString(hini,(PCSZ)"cddb",(PCSZ)"cddbuser",(PCSZ) "guest",username,sizeof(username));
     208    PrfQueryProfileString(hini,(PCSZ)"cddb",(PCSZ)"cddbuserhost",(PCSZ) "",hostname,sizeof(hostname));
    209209
    210210    strncpy(version,QUERYCDDB_VERSION,sizeof(version));
     
    220220      for(a=0;a<NUMSERVERS;a++) {
    221221        sprintf(text,"cddbserver%d",a+1);
    222         PrfQueryProfileString(hini,(CHAR*)"cddb",(CHAR*)text,(CHAR*)"",cddbServer[a],sizeof(cddbServer[0]));
     222        PrfQueryProfileString(hini,(PCSZ)"cddb",(PCSZ)text,(PCSZ)"",cddbServer[a],sizeof(cddbServer[0]));
    223223      }
    224224    }
     
    557557  sprintf(profileName,"%s\\cddb.ini", chrInstallDir);       
    558558  /* Open ini-file */
    559   hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(char *)profileName);
     559  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(PCSZ)profileName);
    560560  if(hini) {
    561561    writeLog("INI file opened.\n");
    562     PrfWriteProfileString(hini,(CHAR*)"cddb",(CHAR*)"cddbuserhost", (CHAR*)hostname);
    563     PrfWriteProfileString(hini,(CHAR*)"cddb",(CHAR*)"cddbuser",(CHAR*) username);
     562    PrfWriteProfileString(hini,(PCSZ)"cddb",(PCSZ)"cddbuserhost", (PCSZ)hostname);
     563    PrfWriteProfileString(hini,(PCSZ)"cddb",(PCSZ)"cddbuser",(PCSZ) username);
    564564    PrfCloseProfile(hini);
    565565  }/* end of if(hini) */
     
    682682          writeLog("\n\n");
    683683          /* Object window creation */
    684           hwndClient=WinCreateWindow(HWND_OBJECT,WC_STATIC,(CHAR*)"cddbObject",0,0,0,0,0,NULL,HWND_BOTTOM,12343,NULL,NULL);
     684          hwndClient=WinCreateWindow(HWND_OBJECT,WC_STATIC,(PCSZ)"cddbObject",0,0,0,0,0,NULL,HWND_BOTTOM,12343,NULL,NULL);
    685685          if(hwndClient) {
    686686            WinSubclassWindow(hwndClient,&cddbObjectProc);
Note: See TracChangeset for help on using the changeset viewer.