SearchPaths() question

Charles Dye

Super Moderator
Staff member
May 20, 2008
Albuquerque, NM
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
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
g:\tc17> dumpbin /exports takecmd.dll | grep SearchPaths
  503  169 0005F1F0 [email protected]@[email protected][email protected][email protected][email protected]@@@[email protected]@@[email protected]@[email protected]

g:\tc17> undecorate [email protected]@[email protected][email protected][email protected][email protected]@@@[email protected]@@[email protected]@[email protected]
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 *)