Not a member yet? Register for your free account!


You last visited: Today at 09:28

  • Did you know? elitepvpers has its own image host, epvpimg.com.

 

Debugging issues

This is a discussion on Debugging issues within the CO2 PServer - Discussions / Questions forum part of the Conquer Online 2 category; I converted my project to x86 and i debug, the server turns on, i go to login, and it freezes ...

Reply
 
Thread Tools
Old 07-19-2012, 02:42   #1
Junior Member
 
Join Date: Jun 2012
Posts: 7
Received Thanks: 1
Debugging issues


I converted my project to x86 and i debug, the server turns on, i go to login, and it freezes at account server. I get these issues in vs any1 got a clue?

Also any1 got an idea as for schooling for C# C++ like classes i should take. is it just basic computer programming or game design? Cuz im enrolling within the next year just wanna know fersure what i should take.
Attached Images
File Type: jpg new problem.JPG (47.3 KB, 22 views)
File Type: jpg same.JPG (29.7 KB, 15 views)
__________________


Last edited by Im2Frosty; 07-19-2012 at 02:51.
Im2Frosty is offline  
Old 07-19-2012, 03:12   #2
ぼくは凶悪な
 
InfamousNoone's Avatar
 
Join Date: Jan 2008
Posts: 1,807
Received Thanks: 2,484
Set the calling convention for memcpy to cdecl.
InfamousNoone is offline  
Thanks
1 User
Im2Frosty (07-19-2012)
Old 07-19-2012, 03:27   #3
Junior Member
 
Join Date: Jun 2012
Posts: 7
Received Thanks: 1
debug claims native doesn't contain a definition for cdecl
Im2Frosty is offline  
Old 07-19-2012, 03:46   #4
Banned
 
Join Date: Dec 2011
Posts: 1,547
Received Thanks: 775
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace ConquerOnline.Native
{
    public unsafe class Msvcrt
    {
        [DllImport(NativeConfiguration.MSVCRT, EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]
        private static extern void* Memcpy(void* dest, void* src, uint count);

        [DllImport(NativeConfiguration.MSVCRT, EntryPoint = "memset", CallingConvention = CallingConvention.Cdecl)]
        private static extern void* Memset(void* dst, byte fill, int length);

        [DllImport(NativeConfiguration.MSVCRT, EntryPoint = "srand", CallingConvention = CallingConvention.StdCall)]
        public static extern short srand(int seed);

        [DllImport(NativeConfiguration.MSVCRT, EntryPoint = "rand", CallingConvention = CallingConvention.StdCall)]
        public static extern short rand();

        #region memset
        public static void MemorySet(byte[] Dest, byte Fill, int Length)
        {
            fixed (byte* dest = Dest)
                Memset(dest, Fill, Length);
        }
        public static void MemorySet(byte[] Dest, byte Fill, uint Length)
        {
            fixed (byte* dest = Dest)
                Memset(dest, Fill, (int)Length);
        }

        public static void MemorySet(byte* Dest, byte Fill, int Length)
        {
            Memset(Dest, Fill, Length);
        }
        public static void MemorySet(byte* Dest, byte Fill, uint Length)
        {
            Memset(Dest, Fill, (int)Length);
        }

        public static void MemorySet(void* Dest, byte Fill, int Length)
        {
            Memset(Dest, Fill, Length);
        }
        public static void MemorySet(void* Dest, byte Fill, uint Length)
        {
            Memset(Dest, Fill, (int)Length);
        }
        #endregion

        #region memcpy
        public static void MemoryCopy(byte* Dest, byte* Src, uint Count)
        {
            Memcpy(Dest, Src, Count);
        }
        public static void MemoryCopy(byte* Dest, byte* Src, int Count)
        {
            Memcpy(Dest, Src, (uint)Count);
        }

        public static void MemoryCopy(void* Dest, void* Src, uint Count)
        {
            Memcpy(Dest, Src, Count);
        }
        public static void MemoryCopy(void* Dest, void* Src, int Count)
        {
            Memcpy(Dest, Src, (uint)Count);
        }

        public static void MemoryCopy(byte[] Dest, byte[] Src, int Count)
        {
            fixed (byte* dest = Dest, src = Src)
                Memcpy(dest, src, (uint)Count);
        }
        public static void MemoryCopy(byte[] Dest, byte[] Src, uint Count)
        {
            fixed (byte* dest = Dest, src = Src)
                Memcpy(dest, src, Count);
        }
        #endregion
    }
}
.
I don't have a username is offline  
Thanks
1 User
Im2Frosty (07-19-2012)
Old 07-19-2012, 06:16   #5
Junior Member
 
Join Date: Jun 2012
Posts: 7
Received Thanks: 1
i still dont understand what was that code for?
Im2Frosty is offline  
Old 07-19-2012, 09:05   #6
Senior Member
 
Korvacs's Avatar
 
Join Date: Mar 2006
Posts: 5,868
Received Thanks: 2,277
memcpy copies data in memory from one location to another, in this case its part of the socket system.
Korvacs is offline  
Thanks
1 User
Im2Frosty (07-19-2012)
Old 07-19-2012, 16:14   #7
ぼくは凶悪な
 
InfamousNoone's Avatar
 
Join Date: Jan 2008
Posts: 1,807
Received Thanks: 2,484
Quote:
Originally Posted by Im2Frosty View Post
i still dont understand what was that code for?
I suggest learning general coding rather than diving into private servers. You're shooting yourself in the foot.
InfamousNoone is offline  
Thanks
1 User
Im2Frosty (07-19-2012)
Old 07-19-2012, 20:18   #8
Junior Member
 
Join Date: Jun 2012
Posts: 7
Received Thanks: 1
yea, i was going to try to learn via having a server but its not working out. i appreciate the help tho guys.
Im2Frosty is offline  
Thanks
1 User
InfamousNoone (07-20-2012)
Old 07-20-2012, 03:59   #9
ぼくは凶悪な
 
InfamousNoone's Avatar
 
Join Date: Jan 2008
Posts: 1,807
Received Thanks: 2,484
My mind was just blown. Someone on E*pvp finally acknowledges that they should learn general coding before trying to run a server? I am shocked.
InfamousNoone is offline  
Old 07-20-2012, 16:28   #10
Banned
 
Join Date: Dec 2011
Posts: 1,547
Received Thanks: 775
Quote:
Originally Posted by InfamousNoone View Post
My mind was just blown. Someone on E*pvp finally acknowledges that they should learn general coding before trying to run a server? I am shocked.
Miracle happens.
I don't have a username is offline  
Reply

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
JIT debugging ....LIBRA.... DarkOrbit 2 01-12-2012 15:56
Debugging haige Grand Chase 0 07-16-2010 09:54
debugging oggs Last Chaos 4 01-28-2010 23:05
Debugging Aion gameroz Aion Main - Discussions / Questions 8 09-19-2009 13:14




All times are GMT +2. The time now is 09:28.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.