RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How do I make a VB6 program for UO using ultima.dll?

Status
Not open for further replies.

Phantom

Knight
Like I said:

I don't think, infact I know for a fact you can't, use a .NET dll with VB 6. Now you could use it with C++ if you compiled it with the .NET compiler.

Thats what razor has done. .NET applications can also use non-.NET dll's but VB 6 can't support .NET

Reason they made VB .NET
 

Phantom

Knight
Yes

VB.NET is VB .NET it is updated with types of things, alot of the old methods still work, some don't.

Really depends on the subject.
 

Bradley

Sorceror
Phantom said:
You wouldn't.

I don't think you can use a .NET dll with VB 6

You can, but it's not very easy. What you have to do is create a wrapper class around the DLL, and expose that wrapper class as a COM component. Then from VB6 you need to use the create object command to create an instance of your wrapper class. The computer will still need to have the .NET framework installed for this to work.

For those of you who will doubt me on this, please see http://msdn.microsoft.com/chats/vstudio/vstudio_091002.asp and http://msdn.microsoft.com/library/d.../cpconexposingnetframeworkcomponentstocom.asp
 

Phantom

Knight
Why I said "Don't" "think" "so"

I figured it most likely was possible, but I knew nobody here would be able to do it, hell I wouldn't do it, learning VB.NET is easier then doing it that way :rolleyes:
 

Bradley

Sorceror
Phantom said:
Why I said "Don't" "think" "so"

I figured it most likely was possible, but I knew nobody here would be able to do it, hell I wouldn't do it, learning VB.NET is easier then doing it that way :rolleyes:

I believe your exact words were:

Phantom said:
I don't think, infact I know for a fact you can't, use a .NET dll with VB 6.
 

psz

Administrator
Which is technically true: By default you CAN'T. You have to "create a wrapper class around the DLL", as you said.
 

Bradley

Sorceror
psz said:
Which is technically true: By default you CAN'T. You have to "create a wrapper class around the DLL", as you said.

Nope. The wrapper class is written in .NET and compiled into a DLL and exposed to COM. The VB6 application uses that wrapper class. Since the wrapper class is written in .NET and IS a DLL you have now used a .NET DLL in a VB6 application. And that proves that Phantom is wrong in this case, which was my whole point.

Infact, the only reason you have to create the wrapper class in this case is because the UOSDK isn't exposed to COM (at least i don't think it is). If the SDK was exposed to COM as an object the wrapper wouldn't even be needed, you could call the SDK directly from VB6 using the COM interface IUnknown.
 

Fallout

Wanderer
Hi all,

If you like VB and UO go to my web page... i make some mul decode

samples... on VB for all+)

http://mudator.by.ru/UoHuffman.zip - NON CRYPT UO CLIENT ....
http://mudator.by.ru/vbSpeed.zip - 100% ASM +) Add to VB some function as

vbShl vbShr vbSar vbSal vb16to32

http://mudator.by.ru/index_old.html - mul decode function...
http://mudator.by.ru/index_new.html - update for some mul samples.... but not for all +)


decode samples consist : Animation, Gump Art, Multi Map, Light Map, Art Land, Art Static, Textures, Fonts, Skills, Hues, Speech, Sound, TileData,
UniFont, RadarCol, Map, Palette and other....
 

Mifune

Sorceror
Wow, those look like some very useful tools... and just when I thought I had uploaded all the mul editing tools in existence to my web server... but this is a good kind of problem.

Is there perhaps a chance that you could make an English version of your website?
 

Mifune

Sorceror
I encountered an error while using MulMultiProjet(Animation). I'm trying to set the path for anim.idx, and when I click on Get Id, the numbers appear on the righthand side, but then it gives me the following error and crashes:

Run-time error '5';

Invalid procedure call or argument

Also, just a thought, but have you ever thought about putting all those single-function programs together into one program?

Another thought, you may want to program some sort of "Loading..." throbber while the program is loading mul data, such as when I clicked Get Id in the Anim program.
 

Fallout

Wanderer
Hm... all samles... from my web .... is worked....

set paths .... to your
anim.mul
anim.idx

then push "Set Path's" button .... and then push "Get Id" ... and all work fine.... look at screenshot ... it get from this samle...


My project must show your how to decode UO FORMATS .... in VB6.... if your know VB6 .... make your own program .... based on this samles.... use decode classes from samples... and create your program
 

Mifune

Sorceror
I can't really explain it, except perhaps that I'm using Windows 98, but Anim won't work for me.

Anyway... sorry for misunderstanding your project's goals.

Still, I think it would be an improvement if it were all one program. It would basically be the VB6 InsideUO.
 

Fallout

Wanderer
1) Examples should work on Windows 98 100 %
2) Try to start an example in VisualBasic 6 SP5 this method help with your problem (in archive with an example his source code)
3) If to do analogue InsideUO that will be easier to understand in what is necessary to do better than InsideUO =) And time at me not so much = (
 

ainis

Wanderer
Well ... it would be nice to have only one program that "decode" and "encode" too. Opensource could be a dream.
 

weaselboy246

Wanderer
may i change the subject a bit, how would i make this so called program using SharpDevelop?

EDIT: Sorry for the bump, didn't notice the time diff. since the topic is on the same pages as the last post
 
Status
Not open for further replies.
Top