Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

SearchPaths() question

Charles Dye

Super Moderator
May
4,948
126
Staff member
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 *)
 
Charles, SearchPaths() is not mentioned in the v17 header file. And it's only exported by TakeCmd.dll as (gribble....)

Yeah, I know. This plugin will only load in pre-17 versions. Since it's for TCC/LE only, I'm okay with that.
 

Similar threads

Back
Top