Thanks to Alan for pointing out the article using GetModuleFileName (****) and 
to Fernando for pointing out the ServerName property (*****) - I am going with 
ServerName instead of the ASTACKINFO approach

Paul Newton

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Fernando D. 
Bozzo
Sent: 14 July 2017 11:17
To: [email protected]
Subject: Re: Alternative to PROGRAM() and SYS(16,n)

Hi Paul:

>From inside the COM component (exe in this case), you can obtain the 
>exe
name using sys(16,0
Another way can be using the class's ServerName property.



El 14 jul. 2017 10:16, "Paul Newton" <[email protected]> escribió:

Hi all

I want to find the path of the "master" EXE at some arbitrary point in code
- and I need it to work within a method of a class defined as OLEPUBLIC.
PROGRAM() and SYS(16,n) do not give me just the fully qualified path/name of 
the master EXE.  I have come up with the following but I wondered whether 
anybody can think of a better/simpler solution.  Thanks

=lASTACKINFO(laStackInfo)
Return laStackInfo(1,2)

Paul Newton

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAGQ_JumNYQT9mr25ihaA3ATJ-LjD3wnT4EQSMBy2F2Q5=x+...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: 
http://leafe.com/reportAbuse/CAGQ_JumNYQT9mr25ihaA3ATJ-LjD3wnT4EQSMBy2F2Q5=x+...@mail.gmail.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/by2pr0201mb179795a408be5940a6e07886a1...@by2pr0201mb1797.namprd02.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to