Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Third Party Program Support

Third Party Program Support Misc support forum and advertisment forum for all RunUO related third party Utilities.

Reply
 
Thread Tools Display Modes
Old 10-01-2003, 08:51 PM   #1 (permalink)
Forum Expert
 
FallsUpStairs's Avatar
 
Join Date: Oct 2002
Posts: 508
Default UOG.DLL In Visual Basic 6

Does anyone have any tips on how I'd go about making a shard connection utility using UOG.DLL in Visual Basic 6 instead of C#? This is what it says in the info. file...
Quote:
Fuction calls in uog.dll

ProcessID UOG_Client_Launch Client*
BOOL UOG_Client_Terminate
BOOL UOG_Client_Resume
DWORD UOG_Client_Patch

* Client may be a dword where 0 is 2d and 1 is 3d or a filepathstring to a uo client.
But how would I tell VB to access the DLL in the first place, and then how would I use it...


....

[code:1]Private Sub Command1_Click()
UOG_Client_Launch Client(0)
End Sub[/code:1]

?

Thanks all
__________________
Fueled by Bawls :cool:
FallsUpStairs is offline   Reply With Quote
Old 10-01-2003, 10:40 PM   #2 (permalink)
Forum Expert
 
FallsUpStairs's Avatar
 
Join Date: Oct 2002
Posts: 508
Default

Oh yeah, and I tried the following, to no avail:

[code:1]Option Explicit
Private Declare Function Patch Lib "uog.dll" (ByVal UOG_Client_Patch As Integer) As Integer
Private Declare Function Launch Lib "uog.dll" (ByVal UOG_Client_Launch As Integer) As Integer

Private Sub Command1_Click()
UOG_Client_Launch (1)
End Sub[/code:1]
__________________
Fueled by Bawls :cool:
FallsUpStairs is offline   Reply With Quote
Old 10-01-2003, 11:13 PM   #3 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,870
Default

There was a C# file packaged with the latest UOG version (written by me) you can use that without much effort in VB.net, 6 on the other hand... well... why are you using vb 6 anyway.
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Old 10-01-2003, 11:14 PM   #4 (permalink)
Forum Expert
 
FallsUpStairs's Avatar
 
Join Date: Oct 2002
Posts: 508
Default

I know I saw your script, but I don't want the program to require the .NET framework, which is why I'm using 6.0.
__________________
Fueled by Bawls :cool:
FallsUpStairs is offline   Reply With Quote
Old 10-01-2003, 11:47 PM   #5 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

Why not use the Framework? All new versions of Windows come with it preinstalled, it's included in all current Service Packs, and it's portable...


Besides, anyone running RunUO or Razor will already have it ;->
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 10-02-2003, 07:11 PM   #6 (permalink)
Forum Expert
 
FallsUpStairs's Avatar
 
Join Date: Oct 2002
Posts: 508
Default

I know I could use framework, but my question still is how can I do it with Visual Basic 6.
__________________
Fueled by Bawls :cool:
FallsUpStairs is offline   Reply With Quote
Old 10-05-2003, 10:51 PM   #7 (permalink)
Forum Expert
 
TheOutkastDev's Avatar
 
Join Date: Sep 2002
Location: Houston, Texas
Age: 22
Posts: 3,933
Default

VB .NET > VB6

so, why are you trying to use VB 6 when VB .Net more powerful?
TheOutkastDev is offline   Reply With Quote
Old 10-05-2003, 11:56 PM   #8 (permalink)
Forum Expert
 
FallsUpStairs's Avatar
 
Join Date: Oct 2002
Posts: 508
Default

Quote:
Originally Posted by FallsUpStairs
I know I saw your script, but I don't want the program to require the .NET framework, which is why I'm using 6.0.
Not all the players on the shard are going to be using the .NET framework. It's more complicated to have to have every player download it. By using this, all I have to do is include the required DLL's with the setup. And telling me that I *should* use .NET isn't helping answer my question.
__________________
Fueled by Bawls :cool:
FallsUpStairs is offline   Reply With Quote
Old 10-06-2003, 12:10 AM   #9 (permalink)
Forum Expert
 
TheOutkastDev's Avatar
 
Join Date: Sep 2002
Location: Houston, Texas
Age: 22
Posts: 3,933
Default

Most new windows versions already have it and its not too hard to install it on a win98 OS or whichever ones didn't come with it...

but heres an answer i guess... you have to import the method from the .dll

look at the UOGDLL.cs and see how C# does it. Translate it to VB
TheOutkastDev is offline   Reply With Quote
Old 10-06-2003, 12:29 AM   #10 (permalink)
Forum Expert
 
FallsUpStairs's Avatar
 
Join Date: Oct 2002
Posts: 508
Default

I have tried that but I can't get it to run correctly. I'm not good at getting DLL functions.

This is how they did it in the example:

[code:1] [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]
__________________
Fueled by Bawls :cool:
FallsUpStairs is offline   Reply With Quote
Old 11-19-2003, 04:28 PM   #11 (permalink)
 
mrfixit's Avatar
 
Join Date: Sep 2002
Posts: 85
Default

There is now a VB6 example in the uoglitesdk package.
mrfixit is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5