Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: shadypalm88 on May 29, 2006, 06:37 PM

Title: BNCSutil 1.2
Post by: shadypalm88 on May 29, 2006, 06:37 PM
I basically finished up a new BNCSutil release, version 1.2.0 (http://bncsutil.ionws.com/new/), but lost interest and never finished documenting it.  The changes I can remember:

- It is no longer necessary to make a call to kd_init(); BNCSutil will do it automatically the first time kd_create() is called.
- New debugging features (http://bncsutil.ionws.com/new/source/src/bncsutil/debug.h) (dumps debugging text to stdout on *NIX and a console window on Windows)
- A C++ wrapper for the NLS functions (http://bncsutil.ionws.com/new/source/src/bncsutil/nls.h)
- A new experimental build system for *NIX (I got tired of struggling with automake/conf)
- Fixed an embarringly-long-standing bug (that I see someone finally came across) that caused "(null)" to appear in the EXE info string
- Code cleanup by standardizing around a simple internal API for file access (http://bncsutil.ionws.com/new/source/src/bncsutil/file.h)

The NLS wrapper class includes functions that allocate and return their buffers instead of forcing the caller to allocate buffers; these buffers are freed when the NLS object is destroyed.  The debugging console is visible in the updated VB example app.

I don't intend to further maintain or update the library.
Title: Re: BNCSutil 1.2
Post by: topaz on May 30, 2006, 05:29 PM
Sweet.
Title: Re: BNCSutil 1.2
Post by: BaDaSs on June 03, 2006, 11:40 PM
Nice Eric, Very nice ;)
*Thumbs Up*
Title: Re: BNCSutil 1.2
Post by: Mystical on June 04, 2006, 04:31 PM
already using it.. good job.
Title: Re: BNCSutil 1.2
Post by: bwally on June 06, 2006, 09:39 PM
I am getting this error when I try and compile using Visual Studio .NET 2003 with the vc7_build project/solution:
c:\bncsutil-1.2.0\bncsutil-1.2.0\src\bncsutil\nls.c(32): fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory

Thanks!
Title: Re: BNCSutil 1.2
Post by: topaz on June 07, 2006, 01:06 AM
Has anyone compiled shared libraries for use on linux?
Title: Re: BNCSutil 1.2
Post by: Kp on June 07, 2006, 06:13 PM
Quote from: bwally on June 06, 2006, 09:39 PM
I am getting this error when I try and compile using Visual Studio .NET 2003 with the vc7_build project/solution:
c:\bncsutil-1.2.0\bncsutil-1.2.0\src\bncsutil\nls.c(32): fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory

Thanks!

You're missing the GNU MP library (http://ftp://ftp.gnu.org/gnu/gmp), or it is not in your search path.

Quote from: Topaz on June 07, 2006, 01:06 AM
Has anyone compiled shared libraries for use on linux?

Yes.
Title: Re: BNCSutil 1.2
Post by: l)ragon on July 01, 2006, 03:57 PM
Fix for the VB Module.
'Global added because I don't like adding shit that I don't have to. - l)ragon
Public Const BNCSUtilVersion = "1.2.0"


' RequiredVersion must be a version as a.b.c
' Returns True if the current BNCSutil version is sufficent, False if not.
' Function will now return the right value - l)ragon
Public Function bncsutil_checkVersion(ByVal RequiredVersion As String) As Boolean
    Dim i&, j&
    Dim Frag() As String
    Dim Req As Long, Check As Long
    bncsutil_checkVersion = False
    Frag = Split(RequiredVersion, ".")
    j = 0
    For i = UBound(Frag) To 0 Step -1
        Check = Check + (CLng(Val(Frag(i))) * (100 ^ j))
        j = j + 1
    Next i
    'v Somone desided to use Check here instead of Req - l)ragon
    Req = bncsutil_getVersion()
    If (Check >= Req) Then
        bncsutil_checkVersion = True
    End If
End Function


Init.
    If bncsutil_checkVersion(BNCSUtilVersion) Then
        rtbAdd rtbChat, True, vbMagenta, "(BNCS DLL) ", vbGreen, "Your BNCSUtil.dll has been found to be " & BNCSUtilVersion & " or better." & vbCrLf
    Else
        rtbAdd rtbChat, True, vbMagenta, "(BNCS DLL) ", vbRed, "Update your BNCSUtil.dll, the dll you have now is to old!" & vbCrLf
        If MsgBox("Error", vbCritical, "BNCSUtil.DLL is outdated go get the latest release." & vbCrLf & "Exiting program.") = vbOK Then
            End
        End If
    End If
Title: Re: BNCSutil 1.2
Post by: topaz on July 11, 2006, 12:53 AM
A couple questions:

While using the kd_create() function in Python, I encounter an access violation write error (0x00000010). Why is this? I'm properly passing the cdkey and its length.

Since the use for kd_init() has been removed, do I need to use kd_free() anymore?

Kp: I meant, a bncsutil shared library.
Title: Re: BNCSutil 1.2
Post by: l2k-Shadow on July 13, 2006, 03:07 PM
I'd imagine you'd have to kd_free because as said, kd_create makes a call to kd_init automatically, so kd_init is still there.