vo_to_net:getexefilename
GetExeFileName
In VO most programmers used libraries and not DLLs. So, when executing any of these functions, they are called directly from the executable, and therefore this code works in VO:
function GetExeFileName() as string local pszBuffer as psz local cName as string pszBuffer := MemAlloc( 1024 ) GetModuleFileName( _GetInst(), pszBuffer, 1023 ) cName := PSZ2String( pszBuffer ) MemFree( pszBuffer ) return cName
But in X# libraries are DLLs and therefore external entities. This call can be changed to
function GetExeFileName() as string local cName as string cName := System.Reflection.Assembly.GetEntryAssembly():Location return cName
vo_to_net/getexefilename.txt · Last modified: 2018/03/03 05:37 by wolfgangriedmann