Changeset 727 in dev
- Timestamp:
- Aug 19, 2008, 11:11:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp
r644 r727 164 164 } 165 165 void SlideString(char *buffer, int slide){ 166 char *temp; 167 temp=(char *)malloc(lstrlen(buffer)+1); 168 lstrcpy(temp,buffer); 169 lstrcpy(buffer+slide,temp); 170 free(temp); 166 Text::SlideString(buffer,slide); 171 167 } 172 168 void SlideBuffer(char *buffer,int length,int slide){ 173 void *temp; 174 temp=malloc(length+1); 175 memcpy(temp,buffer,length); 176 memcpy(buffer+slide,temp,length); 177 free(temp); 169 memmove(buffer+slide,buffer,length); 178 170 } 179 171 … … 415 407 } 416 408 417 static std::string resultStr = ""; 418 resultStr = temporary; 409 static std::string resultStr = temporary; 419 410 420 411 free( temporary ); … … 438 429 BROWSEINFO BrowseInfo; 439 430 LPITEMIDLIST pidlBrowse; 440 LPMALLOC g_pMalloc;441 431 char temporary[MAX_PATH]; 442 432 … … 451 441 pidlBrowse=SHBrowseForFolder(&BrowseInfo); 452 442 if(pidlBrowse){ 453 if(SHGetMalloc(&g_pMalloc)!=0) return 0; 454 SHGetPathFromIDList(pidlBrowse,folder); 455 g_pMalloc->Free(pidlBrowse); 456 g_pMalloc->Release(); 457 return 1; 443 BOOL ret = SHGetPathFromIDList(pidlBrowse,folder); 444 CoTaskMemFree(pidlBrowse); 445 return ret; 458 446 } 459 447 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.