Exemple #1
0
        /// <summary>
        /// Entry point for native code that cannot call static methods.
        /// </summary>
        /// <returns>A function pointer for the static entry point for the WSManPlugin initialization function.</returns>
        public IntPtr GetEntryDelegate()
        {
            InitPluginDelegate initDelegate = new InitPluginDelegate(WSManPluginManagedEntryWrapper.InitPlugin);

            _initDelegateHandle = GCHandle.Alloc(initDelegate);
            return(Marshal.GetFunctionPointerForDelegate(initDelegate));
        }
Exemple #2
0
    private void InitPluginFunctions()
    {
        InitPlugin           = ManualPluginImporter.GetDelegate <InitPluginDelegate>(Plugin_Handle, "InitPlugin");
        InitConsole          = ManualPluginImporter.GetDelegate <InitConsoleDelegate>(Plugin_Handle, "InitConsole");
        InitClient           = ManualPluginImporter.GetDelegate <InitClientDelegate>(Plugin_Handle, "InitClient");
        AttemptConnect       = ManualPluginImporter.GetDelegate <AttemptConnectDelegate>(Plugin_Handle, "AttemptConnect");
        FreeTheConsole       = ManualPluginImporter.GetDelegate <FreeTheConsoleDelegate>(Plugin_Handle, "FreeTheConsole");
        OutputConsoleMessage = ManualPluginImporter.GetDelegate <OutputConsoleMessageDelegate>(Plugin_Handle, "OutputMessageToConsole");

        //Game Commands
        SendTransform = ManualPluginImporter.GetDelegate <SendTransformDelegate>(Plugin_Handle, "SendTransform");
        ReadTransform = ManualPluginImporter.GetDelegate <ReadTransformDelegate>(Plugin_Handle, "ReadTransform");
    }
Exemple #3
0
 /// <summary>
 /// Entry point for native code that cannot call static methods.
 /// </summary>
 /// <returns>A function pointer for the static entry point for the WSManPlugin initialization function.</returns>
 public IntPtr GetEntryDelegate()
 {
     InitPluginDelegate initDelegate = new InitPluginDelegate(WSManPluginManagedEntryWrapper.InitPlugin);
     _initDelegateHandle = GCHandle.Alloc(initDelegate);
     return Marshal.GetFunctionPointerForDelegate(initDelegate);
 }