Hi Pierre, I would have done the strrchr trick if I had only 1 type of
separator (example, the backslash). I started looking for a "find last
occurrence of a char from a string, within a string" function (kind of
strpbrk, but for the last occurrence), that I haven't found, hence this
solution I used. I will look at splitpath, which seems to correspond to what
I want (and which may be used in other places in ntvdm either).
-----Message d'origine-----
De : Ros-dev [mailto:ros-dev-bounces@reactos.org] De la part de Pierre
Schweitzer
Envoyé : mardi 18 août 2015 20:52
À : ros-dev(a)reactos.org
Objet : Re: [ros-dev] [ros-diffs] [hbelusca] 68754: [NTVDM]: Initialize the
PSP' memory control block owner name with the file name (without extension,
and up to 8 chars) of the started program.
And what about simply doing some
PspName = strrchr(ProgramName, '\\'); or whatever?
It looks really weird to start looking at the begin of a path to get its
last element delimitation...
And for the record, otherwise, you have splitpath :-)
On 18/08/2015 14:35, Thomas Faber wrote:
On 2015-08-18 14:26, hbelusca(a)svn.reactos.org wrote:
> [NTVDM]: Initialize the PSP' memory control block owner name with the
file
name (without extension, and up to 8 chars) of the started program.
Shouldn't that use GetShortPathName to make sure the program can find
itself on disk? :p
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
--
Pierre Schweitzer <pierre at reactos.org> System & Network Administrator
Senior Kernel Developer ReactOS Deutschland e.V.