3) DotNet_LoadAssembly (user domain).au3 626 B

1234567891011121314151617181920
  1. #include "..\..\Includes\DotNetUtils.au3"
  2. Opt( "MustDeclareVars", 1 )
  3. Example()
  4. Func Example()
  5. Local $oMyDomain
  6. ; Create and start a user domain to run .NET code
  7. ; Set a base directory to load .NET assemblies into the domain
  8. DotNet_StartDomain( $oMyDomain, "MyDomain", @ScriptDir )
  9. DotNet_ListDomainsEx()
  10. ; Loads a .NET assembly DLL-file into a user domain
  11. Local $oXPTable = DotNet_LoadAssembly( "XPTable.dll", $oMyDomain )
  12. If @error Then Return ConsoleWrite( "DotNet_LoadAssembly ERR" & @CRLF )
  13. ConsoleWrite( "DotNet_LoadAssembly OK" & @CRLF )
  14. DotNet_ListAssembliesEx( $oMyDomain )
  15. #forceref $oXPTable
  16. EndFunc