Board.KolibriOS.org

Official KolibriOS board
It is currently Sun Nov 17, 2019 6:55 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Aug 26, 2014 8:25 pm 
Offline
User avatar

Joined: Sun May 11, 2014 9:21 pm
Posts: 97
How can an application obtain it's full path?
Note: the thread info record only reveals it's application name.

_________________
Greetings from Seppe


Top
   
PostPosted: Tue Aug 26, 2014 9:09 pm 
Offline
Kernel Developer

Joined: Sun Feb 10, 2013 12:37 pm
Posts: 2329
Code:
   use32
   org 0x0
   db 'MENUET01'   ; 8 byte id
   dd 0x01      ; header version
   dd START   ; start of code
   dd IM_END   ; size of image
   dd I_END   ; memory for app
   dd stacktop   ; esp
   dd ext_dest_cmdline   ; I_Param
   dd path      ; APPLICATION PACH

...

path:
   rb  4096

_________________
Всем чмоки в этом проекте! Засуньте эти 11 лет себе в жопу!


Top
   
PostPosted: Tue Aug 26, 2014 10:01 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1248
yes, if the last dword of header is non-zero, the kernel will thread it as a 4096 byte buffer where it will write path into.

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited