|
||
|
|||||||
| Third Party Program Support Misc support forum and advertisment forum for all RunUO related third party Utilities. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Posts: 508
|
Does anyone have a sample of how I would set up a program utilizing UOG.DLL to start the client and point to a specific address WITHOUT editing the Login.cfg? Hrm...
Does anyone know if it would be something in the UOGDLL.cs or the Program itself..? UOGDLL.cs [code:1]/* * ----------------------------------------------------------------------- * UOG.DLL .NET C# code example * ----------------------------------------------------------------------- * Written by Zippy (bryan@runuo.com) * Altered by Mr. Fixit (mrfixit@online.no) * * */ using System; using System.Runtime.InteropServices; namespace UOGDLL { public class UOG { [DllImport( "uog.dll", EntryPoint="UOG_Client_Launch", ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int Launch( int client ); [DllImport( "uog.dll", EntryPoint="UOG_Client_Launch", ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int Launch( string clientPath ); [DllImport( "uog.dll", EntryPoint="UOG_Client_Terminate", ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int Terminate(); [DllImport( "uog.dll", EntryPoint="UOG_Client_Patch", ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int Patch(); [DllImport( "uog.dll", EntryPoint="UOG_Client_Resume", ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int Resume(); } } [/code:1] Maybe ... [code:1] [DllImport( "uog.dll", EntryPoint="UOG_Client_Launch", ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int Launch( "server.dns.com" client );[/code:1] ? Or is it the program.... Start2D.cs [code:1]/* * ----------------------------------------------------------------------- * UOG.DLL .NET C# code example * ----------------------------------------------------------------------- * Written by Zippy (bryan@runuo.com) * Altered by Mr. Fixit (mrfixit@online.no) * * */ using UOGDLL; using System; namespace Start2D { public class Start2DClass { [STAThread] public static void Main( string[] Args ) { // Start the uo client as a suspended process // 0 = 2d client // 1 = 3d client if (UOG.Launch( 0 ) == 0) { // Launch failed! return; } // Disable encryption and add multiuo support if (UOG.Patch() == 0) { // Failed to apply patch! Terminating client. UOG.Terminate(); return; } // Unsuspend client UOG.Resume(); } } } [/code:1] Would it be somewhere in here? If anyone has any idea, I would like the input, thanks! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|