• Welcome to Valhalla Legends Archive.
 

bncsutil.dll with C++

Started by ThePro, November 19, 2005, 05:46 PM

Previous topic - Next topic

ThePro

I'm using C++ and had to convert the definitions of bncsutil.dll from VB in C++.
Thats my Code:


long MPQNR = 3;
long CheckSum = 0;

checkRevisionFlat("A=460329258 B=123071798 C=254350412 4 A=A^S B=B-C C=C+A A=A^B", "STAR/starcraft.exe", "STAR/Storm.dll", "STAR/battle.snp", MPQNR, CheckSum);

The value of CheckSum is still 0 after passing this function. :(
What do I do wrong?

What is the Difference between checkRevision and CheckRevisionFlat?

ThePro

I solved the Problem.
I declared the last parameter (CheckSum) as Pointer in the Dll Import.
I changed CheckSum to &Checksum and got the exe hash. :)))

MyndFyre

Um.... just FYI, BNCSUtil is written in C++.  You shouldn't have had to convert the VB definitions; you should have just used the header file.
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.

shadypalm88

Quote from: MyndFyre on November 19, 2005, 08:50 PM
Um.... just FYI, BNCSUtil is written in C++.  You shouldn't have had to convert the VB definitions; you should have just used the header file.
Yeah, at the moment you'll need the full source to get the header files though.  WinRAR can open the .tar.gz/.tar.bz2 files.

ThePro

Too late, I converted the funktions I need by myself lol. I get connected to battle.net now, I made it. :) Thanks to all in this forum and the bncsutil.dll ;)