On 2015-08-18 14:26, hbelusca@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
This is the MCB name, so it's not important except maybe for diagnostic tools. On the other hand, for the sake of correctness, the name has to fit in 8 characters, so if the program is called "longername.com" the MCB name should be "LONGER~1".
Regards, Alex
On Tue, Aug 18, 2015 at 02:35:43PM +0200, Thomas Faber wrote:
On 2015-08-18 14:26, hbelusca@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@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
I need to recheck, but the name given to the function that builds this MCB name should be already the short path form. Hermès.
-----Message d'origine----- De : Ros-dev [mailto:ros-dev-bounces@reactos.org] De la part de Alexander Andrejevic Envoyé : mardi 18 août 2015 15:46 À : ReactOS Development List 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.
This is the MCB name, so it's not important except maybe for diagnostic tools. On the other hand, for the sake of correctness, the name has to fit in 8 characters, so if the program is called "longername.com" the MCB name should be "LONGER~1".
Regards, Alex
On Tue, Aug 18, 2015 at 02:35:43PM +0200, Thomas Faber wrote:
On 2015-08-18 14:26, hbelusca@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@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
-- Alexander Andrejevic theflash@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
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@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@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
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@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@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@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.