Click here to Skip to main content
15,920,576 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMemory Management across DLLs Pin
Member 155768211-Jan-05 8:10
Member 155768211-Jan-05 8:10 
GeneralRe: Memory Management across DLLs Pin
Blake Miller11-Jan-05 12:16
Blake Miller11-Jan-05 12:16 
GeneralRe: Memory Management across DLLs Pin
12-Jan-05 13:28
suss12-Jan-05 13:28 
GeneralRe: Memory Management across DLLs Pin
Bo Hunter12-Jan-05 13:25
Bo Hunter12-Jan-05 13:25 
GeneralRe: Memory Management across DLLs Pin
digwizfox13-Jan-05 7:39
digwizfox13-Jan-05 7:39 
GeneralCommand Line String Replacer Pin
Joel Holdsworth11-Jan-05 7:40
Joel Holdsworth11-Jan-05 7:40 
GeneralRe: Command Line String Replacer Pin
David Crow11-Jan-05 8:58
David Crow11-Jan-05 8:58 
GeneralRe: Command Line String Replacer Pin
basementman11-Jan-05 9:15
basementman11-Jan-05 9:15 
Why not just write one in about 20 lines of code?

EX (error checking omitted for brevity):

<br />
int main(int argc, char *argv[])<br />
{<br />
  if (argc != 4)<br />
    {  //progname, filename, searchstr, replacestr<br />
      printf("Missing Parameters");<br />
      exit(1);<br />
    }<br />
<br />
  FILE *fp = fopen(argv[1],"rb");<br />
  if (fp)<br />
    {<br />
      CString cFileData;<br />
      char caBuf[4096];<br />
      int iSize = fread(caBuf,1,sizeof(caBuf)-1,fp);<br />
      while (iSize > 0)<br />
        {<br />
          caBuf[iSize] = 0;<br />
          cFileData += caBuf;<br />
          iSize = fread(caBuf,1,sizeof(caBuf)-1,fp);<br />
        }<br />
<br />
      fclose(fp);<br />
<br />
      cFileData.Replace(argv[2],argv[3]);<br />
<br />
      fp = fopen(argv[1],"wb");<br />
      if (fp)<br />
        {<br />
          fwrite((LPCSTR)cFileData,1,cFileData.GetLength(),fp);<br />
          fclose(fp);<br />
        }<br />
      // else error<br />
    }<br />
   // else error<br />
<br />
  return 0;<br />
}<br />


 onwards and upwards... 
GeneralRe: Command Line String Replacer Pin
Axter11-Jan-05 12:35
professionalAxter11-Jan-05 12:35 
GeneralRe: Command Line String Replacer Pin
basementman12-Jan-05 3:35
basementman12-Jan-05 3:35 
GeneralRe: Command Line String Replacer Pin
Joel Holdsworth12-Jan-05 2:28
Joel Holdsworth12-Jan-05 2:28 
GeneralRe: Debug Question Pin
BlackDice11-Jan-05 7:27
BlackDice11-Jan-05 7:27 
GeneralSimple question - Threads and Timers Pin
no_reg_name11-Jan-05 5:36
no_reg_name11-Jan-05 5:36 
GeneralRe: Simple question - Threads and Timers Pin
ThatsAlok11-Jan-05 6:45
ThatsAlok11-Jan-05 6:45 
GeneralRe: Simple question - Threads and Timers Pin
Blake Miller11-Jan-05 7:18
Blake Miller11-Jan-05 7:18 
GeneralRe: Simple question - Threads and Timers Pin
PJ Arends11-Jan-05 9:16
professionalPJ Arends11-Jan-05 9:16 
GeneralRe: Simple question - Threads and Timers Pin
basementman11-Jan-05 9:18
basementman11-Jan-05 9:18 
GeneralRe: Simple question - Threads and Timers Pin
PJ Arends11-Jan-05 9:52
professionalPJ Arends11-Jan-05 9:52 
GeneralRe: Simple question - Threads and Timers Pin
basementman11-Jan-05 9:17
basementman11-Jan-05 9:17 
GeneralDisabling only the menubar/toolbars of the mainframe Pin
Maximilien11-Jan-05 4:18
Maximilien11-Jan-05 4:18 
GeneralRe: Disabling only the menubar/toolbars of the mainframe Pin
Ravi Bhavnani11-Jan-05 4:26
professionalRavi Bhavnani11-Jan-05 4:26 
GeneralRe: Disabling only the menubar/toolbars of the mainframe Pin
basementman11-Jan-05 5:40
basementman11-Jan-05 5:40 
GeneralRe: Disabling only the menubar/toolbars of the mainframe Pin
Maximilien11-Jan-05 6:05
Maximilien11-Jan-05 6:05 
QuestionI need vc++ project please? Pin
Anas_zet11-Jan-05 4:07
Anas_zet11-Jan-05 4:07 
AnswerRe: I need vc++ project please? Pin
Maximilien11-Jan-05 6:19
Maximilien11-Jan-05 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.