public MarshalManagedToNative ( string ManagedObj ) : |
||
ManagedObj | string | The string to marshal. |
return |
/// <summary> /// Sets the load order of the plugins. /// </summary> /// <remarks> /// The returned list of sorted plugins will include plugins that were not /// included in the specified order list, if plugins exist that weren't included. /// The extra plugins will be apeended to the end of the given order. /// </remarks> /// <param name="p_strPlugins">The list of plugins in the desired order.</param> public void SetLoadOrder(string[] p_strPlugins) { string[] strSortedPlugins = p_strPlugins; UInt32 uintStatus = 0; using (StringArrayManualMarshaler ammMarshaler = new StringArrayManualMarshaler("UTF8")) uintStatus = m_dlgSetLoadOrder(m_ptrBossDb, ammMarshaler.MarshalManagedToNative(StripPluginDirectory(strSortedPlugins)), Convert.ToUInt32(strSortedPlugins.Length)); HandleStatusCode(uintStatus); }
/// <summary> /// Sets the list of active plugins. /// </summary> /// <param name="p_strActivePlugins">The list of plugins to set as active.</param> public void SetActivePlugins(string[] p_strActivePlugins) { try { UInt32 uintStatus = 0; using (StringArrayManualMarshaler ammMarshaler = new StringArrayManualMarshaler("UTF8")) uintStatus = m_dlgSetActivePlugins(m_ptrBossDb, ammMarshaler.MarshalManagedToNative(StripPluginDirectory(p_strActivePlugins)), Convert.ToUInt32(p_strActivePlugins.Length)); HandleStatusCode(uintStatus); } catch { MessageBox.Show("The selected plugin has been manually removed." + Environment.NewLine + "Restart NMM or select again your game on Change Game Mode to refresh the plugin list."); } }
/// <summary> /// Sets the list of active plugins. /// </summary> /// <param name="p_strActivePlugins">The list of plugins to set as active.</param> public void SetActivePlugins(string[] p_strActivePlugins) { try { UInt32 uintStatus = 0; using (StringArrayManualMarshaler ammMarshaler = new StringArrayManualMarshaler("UTF8")) uintStatus = m_dlgSetActivePlugins(m_ptrBossDb, ammMarshaler.MarshalManagedToNative(StripPluginDirectory(p_strActivePlugins)), Convert.ToUInt32(p_strActivePlugins.Length)); HandleStatusCode(uintStatus); } catch { MessageBox.Show("The selected plugin has been manually removed." + Environment.NewLine + "Restart NMM or select again your game on Change Game Mode to refresh the plugin list."); } }
/// <summary> /// Sets the load order of the plugins. /// </summary> /// <remarks> /// The returned list of sorted plugins will include plugins that were not /// included in the specified order list, if plugins exist that weren't included. /// The extra plugins will be apeended to the end of the given order. /// </remarks> /// <param name="p_strPlugins">The list of plugins in the desired order.</param> public void SetLoadOrder(string[] p_strPlugins) { string[] strSortedPlugins = p_strPlugins; UInt32 uintStatus = 0; using (StringArrayManualMarshaler ammMarshaler = new StringArrayManualMarshaler("UTF8")) uintStatus = m_dlgSetLoadOrder(m_ptrBossDb, ammMarshaler.MarshalManagedToNative(StripPluginDirectory(strSortedPlugins)), Convert.ToUInt32(strSortedPlugins.Length)); HandleStatusCode(uintStatus); }