vo_to_net:getexefilename
This is an old revision of the document!
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:
[code]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[/code] But in X# libraries are DLLs and therefore external entities. This call can be changed to [code]function GetExeFileName() as string local cName as string cName := System.Reflection.Assembly.GetEntryAssembly():Location return cName[/code]
vo_to_net/getexefilename.1520055415.txt.gz · Last modified: 2018/03/03 05:36 by wolfgangriedmann