using the dll as an added reference you CAN do msvcrt.msvcrt.srand/rand. It's how it works in immune's source and the way I did it with my last test source.
It causes the same problem if I use a dll import + function for it as well. Hell, I don't even have to call ANY of the functions and the error happens... no clue why :S
here's a copy of the VERY basic test bed I was using (it has nothing added or finished so not like nubs are gonna use it to get very far lol)
<edit>
sorry, re-read what you said and yes.. I can call them (either via dllimport or referencing the dll...) but the problem is that I'm getting the error OUTSIDE of when I'm actively invoking them (it has nothing to do with rand or srand... I'm guessing it's hybrid's dll using memcpy)
<edit x2>
yes... memcpy seems to be part of hybrids socket system (checked the 5018 version of it as easy reference)
Very strange... it only seems to be happening now even though I haven't really changed much.
public static List<byte[]> Split(byte[] buffer)
{
List<byte[]> packets = new List<byte[]>();
int offset = 0;
while (offset < buffer.Length + 8)
{
int length = BitConverter.ToInt16(buffer, 0) + 8;
byte[] packet = new byte[length];
offset += length;
packets.Add(packet);
}
if (offset < buffer.Length)
{
packets.Add(buffer);
}
return packets;
}
(You can change this a bit, since the original is different but theres something very private in it)
How to use this?
foreach packet in TQPacket.Split(received data)
-> Process packet
AND
About password cryptography, you will need to rewrite it, the current thing downloads the file, causing the old/original file to be lost, It's very annoying, I simply rewrote it.
Actually seem to have traced it to the way hybrid's socket system manages incoming packets.
That's the ONLY thing using memcpy, not my source. I may have to rip his socket system from the dll cause it simply refuses to let it work all of a sudden (worked fine before)
Quote:
Originally Posted by Kiyono
As I understand it, he gets an error as soon as he imports the dll without even using it.
Hybrid's source +5018 07/03/2010 - CO2 Private Server - 7 Replies Well I'm upgrading Hybrid's source past 5017, everything seems good to go, but on logging in, I get thus exception.
http://img256.imageshack.us/img256/4273/63984248. jpg
Anyone know whats wrong?
Hybrid's source updated to 5252 05/07/2010 - CO2 Private Server - 13 Replies Hybrid's source updated to 5252 :D! Rarrr TeratoDragon xD
[Help]Hybrid's Source 08/09/2009 - CO2 Private Server - 7 Replies Hey I find this really confusing. I want to try out this source but I don't know where to start. http://www.elitepvpers.com/forum/co2-pserver-discus sions-questions/203219-release-extremely-basic-but -working-bugless-c-source.html
If anyone can help me on this step by step on msn please add me: [email protected]
[Help] Connecting to Hybrid's source. 05/01/2009 - CO2 Private Server - 9 Replies Hey guys, me again.
I downloaded Hybrid's source, set it all up and ran the server.
When I connect it comes up with "Unable to connect to the game server", now this usually happens when I.P's are wrong, i think, but I only found 1 I.P I had to set, and that was in the client's server.dat
I am supposed to be using a 5017 client, right?
Thanks :mofo:
!Leaked C0de From Hybrid's Server! 08/01/2008 - Conquer Online 2 - 5 Replies case "@egypt":
case "@imemo":
case "@suicide":
{
Kernel.KillPlayer(Client, "A non existent being called God");
break;
}
Also