• Welcome to Valhalla Legends Archive.
 

Re: Smacker (SmackW32.dll) SDK

Started by topaz, December 10, 2005, 08:09 PM

Previous topic - Next topic

topaz

Can you port the functions to VB6?
RLY...?

Warrior

I believe code for displaying .smk files was posted somewhere in the VB6 forum recently (hint: Joe needed help)
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

MyndFyre

Quote from: Warrior on December 12, 2005, 02:52 PM
I believe code for displaying .smk files was posted somewhere in the VB6 forum recently (hint: Joe needed help)

No, that was for displaying PCX files.  There was documentation in Bnet BotDev Reference, but that was a link to the smackw32.dll exports documentation, and this topic was split from that post.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Mesiah / haiseM

The document is pretty easy to understand. All you need is some graphics knowledge to combine everything. Took me no time at all...
]HighBrow Innovations
Coming soon...

AIM Online Status: 

dxoigmn

Quote from: Topaz on December 22, 2005, 09:12 PM
Quote from: Topaz on December 10, 2005, 08:09 PM
Can you port the functions to VB6?

I don't recall him giving the actual source code (can't check, link doesn't work), at least usually SDKs don't. Perhaps you mean the function declarations? MSDN can help.

Ringo

I dont think Vb6 can call the functions, as there not __stdcall? or are they?
I just get entry point not found, like the function doesnt exist, or the functions dont support stdcalling.

Is this right?

Smack* SmackOpen(char* name,u32 flags, u32 extrabuf);


Public Declare Function SmackOpen Lib "Smackw32.dll" (PathToSDK As String, InFlag As Long, ExtraSpace As Long) As Long

Dim SDKhdl As Long 'returns handle to the file i presume..
SDKhdl = SmackOpen(App.Path & "\ad000bed.smk", u32flags, u32extrabuf)


Its the same for all, it cant find entry point for any of the functions :(.

Kp

Prototype looks ok, but you need to specify to VB that the calling convention is _cdecl.  Unfortunately, VB doesn't actually support _cdecl.  You could write wrappers around all of them, though.  Make a new C file which exports _stdcall functions which turn around and call the Smacker _cdecl functions, then rebuild the Smacker DLL with those functions included.  Or just get used to using a language which supports more than one calling convention. :)

Also, you might be getting 'function not found' errors if the Smacker code was compiled as C++ code, which would lead to name mangling in the DLL.  If this has occured, you'll need to recompile the DLL without name mangling enabled.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Ringo

Is smaker open source? i was useing the one from SC directory, i think all the clients use file version 3.0.0

UserLoser.

Quote from: Ringo on December 24, 2005, 04:33 AM
Is smaker open source? i was useing the one from SC directory, i think all the clients use file version 3.0.0

No

Ringo


Kp

Quote from: Ringo on December 24, 2005, 04:33 AMIs smaker open source? i was useing the one from SC directory, i think all the clients use file version 3.0.0

Why should that stop you?  Just add the necessary functions in the end of .text, update the .edata section (which might've been rolled into .rdata if you're unlucky), and you should be good to go.  It'd obviously be easier if you'd picked something which was Free to begin with, but openness is not required for success.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!