• Welcome to Valhalla Legends Archive.
 

I feel stupid

Started by Barabajagal, February 22, 2008, 02:14 PM

Previous topic - Next topic

Barabajagal

Private Declare Function CheckRevisionB Lib "CheckRevision.dll" (ByVal GameEXE As String, ByVal GameStorm As String, ByVal GameBattle As String, ByVal CRevRequest As String, ByRef EXEVersion As Long, ByRef Checksum As Long, ByVal CRevResult As String, ByVal CRevDLL As String) As Long

Public Sub TestCRev()
Dim sGameEXE    As String
Dim sGameStorm  As String
Dim sGameBattle As String
Dim sCRevReq    As String
Dim sDLLName    As String
Dim lEXEVer     As Long
Dim lChecksum   As Long
Dim sCrevRet    As String
Dim CRet        As Long
    sGameEXE = "C:\Program Files\Diablo II\Game.exe"
    sGameStorm = "C:\Program Files\Diablo II\Bnclient.dll"
    sGameBattle = "C:\Program Files\Diablo II\D2client.dll"
    sCRevReq = "A=166443184 B=361259356 C=197717253 4 A=A-S B=B-C C=C+A A=A+B"
    sDLLName = "ver-IX86-7.dll"
    CRet = CheckRevisionB(sGameEXE, sGameStorm, sGameBattle, sCRevReq, lEXEVer, lChecksum, sCrevRet, sDLLName)
    Debug.Print CRet & ": " & Hex$(lEXEVer) & " " & Hex$(lChecksum) & " " & sCrevRet
End Sub

Every time I run this, it crashes, saying
"AppName: vb6.exe    AppVer: 6.0.97.82    ModName: checkrevision.dll
ModVer: 1.0.0.5    Offset: 00004a69r"

I can't figure out what's wrong for the life of me.

brew

* brew wonders if the dll likes writing to 0 length strings
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Barabajagal

Oh... Duh. I knew I was gonna hate myself for not knowing this.

UserLoser

checkrevision export is stdcall?

Barabajagal