SearchPaths() question

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,739
108
Albuquerque, NM
prospero.unm.edu
SearchPaths() returns a pointer to a filename buffer. Am I supposed to do something to release that buffer once I've read the filename -- free() it or FreeMem() it or something? Or should I just copy the string out and then forget the address?
 
Having looked at SearchPaths() for the first time ... good question, Charles. I also don't understand
Code:
pszAllPaths - if != NULL, keep searching all paths to get all matches.
Is pszAllPaths just a flag? If not what might be put there?
 
Charles, SearchPaths() is not mentioned in the v17 header file. And it's only exported by TakeCmd.dll as
Code:
g:\tc17> dumpbin /exports takecmd.dll | grep SearchPaths
  503  169 0005F1F0 ?SearchPaths@@YG?AV?$CStringT@_WV?$StrTraitATL@_WV?$ChTraitsCRT@_W@ATL@@@ATL@@@ATL@@PB_W0HPAHPA_W@Z

g:\tc17> undecorate ?SearchPaths@@YG?AV?$CStringT@_WV?$StrTraitATL@_WV?$ChTraitsCRT@_W@ATL@@@ATL@@@ATL@@PB_W0HPAHPA_W@Z
class ATL::CStringT<wchar_t,class ATL::StrTraitATL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __stdcall SearchPaths(wchar_t const *,wchar_t const *,int,int *,wchar_t *)
 

Similar threads