Anyone Know ...

Private Discussion on Helbreath Hack Development, (Do not release hacks which are talked about in here to the rest of the forum unless you write the hacks)
Post Reply
tyteman
Spamtastic
Posts: 1149
Joined: Wed Nov 12, 2003 2:00 pm
Location: CA, USA

Post by tyteman »

whats wrong with this?

Code: Select all

// XSocket.h: interface for the XSocket class.
//
//////////////////////////////////////////////////////////////////////

// Çì´õÀÇ È®ÀÎÄÚµå´Â 1¹ÙÀÌÆ®, Å©±â´Â WORD·Î º¯°æµÇ¾úÀ½. Áï Çì´õ´Â ÃÑ 3¹ÙÀÌÆ® 


#if !defined(AFX_XSOCKET_H__F9D1BA42_7338_11D2_A8E6_00001C7030A6__INCLUDED_)
#define AFX_XSOCKET_H__F9D1BA42_7338_11D2_A8E6_00001C7030A6__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif  _MSC_VER >= 1000

#define _WINSOCK2API_
#define  FD_SETSIZE 2000
#include <windows.h>
#include <windowsx.h>
#include <winsock2.h>
#include <winsock.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <malloc.h>

#define DEF_XSOCK_LISTENSOCK &nbsp;	1
#define DEF_XSOCK_NORMALSOCK &nbsp;	2 &nbsp; &nbsp;
#define DEF_XSOCK_SHUTDOWNEDSOCK &nbsp;3 &nbsp; &nbsp;

#define DEF_XSOCKSTATUS_READINGHEADER	11
#define DEF_XSOCKSTATUS_READINGBODY &nbsp;12

#define DEF_XSOCKEVENT_SOCKETMISMATCH &nbsp;	-121	// &#188;&#210;Ä&#207; &#192;&#204;&#186;&#165;&#198;®&#191;Í &#188;&#210;Ä&#207;&#192;&#204; &#188;­·Î ´&#217;¸&#163;´&#217;. &#40;&#192;&#204;·± °&#230;&#191;&#236;°&#161;?&#41;
#define DEF_XSOCKEVENT_CONNECTIONESTABLISH &nbsp;-122	// Á&#162;&#188;Ó&#192;&#204; &#192;&#204;·ç&#190;î Á&#179;´&#217;.
#define DEF_XSOCKEVENT_RETRYINGCONNECTION &nbsp;-123	// Á&#162;&#188;Ó&#192;» ´&#217;&#189;&#195; &#189;&#195;µµÇ&#207;´Â Áß&#192;&#204;´&#217;.
#define DEF_XSOCKEVENT_ONREAD &nbsp; &nbsp;	-124	// ¸&#222;&#189;&#195;Áö¸¦ &#192;&#208;´Â Áß&#192;&#204;´&#217;. 
#define DEF_XSOCKEVENT_READCOMPLETE &nbsp; &nbsp;-125	// Ç&#207;&#179;&#170;&#192;Ç ¸&#222;&#189;&#195;Áö¸¦ &#191;&#207;&#192;ü&#200;÷ &#188;ö&#189;&#197;Çß´&#217;.
#define DEF_XSOCKEVENT_UNKNOWN &nbsp; &nbsp;	-126	// &#190;Ë&#188;ö&#190;&#248;´Â &#192;&#204;&#186;&#165;&#198;®&#192;&#204;´&#217;.
#define DEF_XSOCKEVENT_SOCKETCLOSED &nbsp; &nbsp;-127	// &#188;&#210;Ä&#207;&#192;&#204; ´ÝÇ&#251;´&#217;. 
#define DEF_XSOCKEVENT_BLOCK &nbsp; &nbsp;	-128	// ¸&#222;&#189;&#195;Áö¸¦ &#186;¸&#179;»´&#217;°&#161; &#188;&#210;Ä&#207;&#192;&#204; &#186;í·°µ&#200; »ó&#197;Â&#192;&#204;´&#217;.
#define DEF_XSOCKEVENT_SOCKETERROR &nbsp; &nbsp;-129	// &#188;&#210;Ä&#207;&#191;&#161; &#191;&#161;·&#175;°&#161; &#185;ß»ýÇß´&#217;. &#192;&#204;°&#230;&#191;&#236; &#197;¬·&#161;&#189;&#186;¸¦ »&#232;Á¦Ç&#207;&#191;©&#190;ß Ç&#209;´&#217;.
#define DEF_XSOCKEVENT_CRITICALERROR &nbsp;	-130 &nbsp; &nbsp;// Ä&#161;¸í&#192;&#251;&#192;Î &#191;&#161;·&#175;·Î ÇÁ·Î±×·&#165; &#192;ü&#195;&#188;°&#161; ¸&#216;&#195;ç&#190;ß Ç&#209;´&#217;.
#define DEF_XSOCKEVENT_NOTINITIALIZED &nbsp;	-131	// &#197;¬·&#161;&#189;&#186;°&#161; &#195;&#202;±â&#200;­ µÇÁö &#190;&#202;&#192;&#186; »ó&#197;·Π»ç&#191;ëµ&#198;´&#217;.
#define DEF_XSOCKEVENT_MSGSIZETOOLARGE &nbsp;	-132	// &#186;¸&#179;»°í&#192;Ú Ç&#207;´Â ¸&#222;&#189;&#195;Áö&#192;Ç »ç&#192;&#204;Áî°&#161; &#179;&#202;&#185;« &#197;©´&#217;.
#define DEF_XSOCKEVENT_CONFIRMCODENOTMATCH &nbsp;-133	// &#200;®&#192;ÎÄÚµ&#229;°&#161; &#192;&#207;Ä&#161;Ç&#207;Áö &#190;&#202;´Â´&#217;. »&#232;Á¦µÇ&#190;î&#190;ß Ç&#209;´&#217;.
#define DEF_XSOCKEVENT_QUENEFULL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-134 &nbsp; &nbsp;// &#186;í·&#207; &#197;&#165;&#192;Ç °&#248;°&#163;&#192;&#204; &#190;&#248;´&#217;.
#define DEF_XSOCKEVENT_UNSENTDATASENDBLOCK &nbsp;-135 &nbsp; &nbsp;// &#197;&#165;&#191;&#161; &#192;Ö´Â µ&#165;&#192;&#204;&#197;͸¦ &#186;¸&#179;»´&#217;°&#161; ¶Ç &#186;í·&#207;&#192;&#204; °É·&#200;´&#217;. 
#define DEF_XSOCKEVENT_UNSENTDATASENDCOMPLETE	-136	// &#197;&#165;&#191;&#161; &#192;Ö´Â ¸&#240;µç µ&#165;&#192;&#204;&#197;͸¦ &#186;¸&#179;´&#217;.

#define DEF_XSOCKBLOCKLIMIT &nbsp; &nbsp; &nbsp;300 &nbsp;// &#192;&#204; &#197;¬·&#161;&#189;&#186; &#188;&#210;Ä&#207;&#192;&#186; ?&#185;&#248;&#192;&#204;»ó &#186;í·&#207;µÇ¸é ´&#245;&#192;&#204;»ó µ&#165;&#192;&#204;&#197;͸¦ &#192;ú&#192;&#229;Ç&#210; &#188;ö &#190;&#248;´&#217;. &nbsp;

class XSocket &nbsp;
&#123;
public&#58; &nbsp; &nbsp; &nbsp; 
	int iGetPeerAddress&#40;char * pAddrString&#41;;
	char * pGetRcvDataPointer&#40;DWORD * pMsgSize, char * pKey = NULL&#41;;
	SOCKET iGetSocket&#40;&#41;;
	BOOL bAccept&#40;class XSocket * pXSock, unsigned int uiMsg&#41;;
	BOOL bListen&#40;char * pAddr, int iPort, unsigned int uiMsg&#41;;
	
	int iSendMsg&#40;char * cData, DWORD dwSize, char cKey = NULL&#41;;
	BOOL bConnect&#40;char * pAddr, int iPort, unsigned int uiMsg&#41;;
	int &nbsp;iOnSocketEvent&#40;WPARAM wParam, LPARAM lParam&#41;;
	BOOL bInitBufferSize&#40;DWORD dwBufferSize&#41;;
	XSocket&#40;HWND hWnd, int iBlockLimit&#41;;
	virtual ~XSocket&#40;&#41;;

	int &nbsp;m_WSAErr;
	BOOL m_bIsAvailable;

private&#58;
	void _CloseConn&#40;&#41;;
	
	int _iSendUnsentData&#40;&#41;;
	int _iRegisterUnsentData&#40;char * cData, int iSize&#41;;
	int _iSend&#40;char * cData, int iSize, BOOL bSaveFlag&#41;;
	int _iSend_ForInternalUse&#40;char * cData, int iSize&#41;;
	int _iOnRead&#40;&#41;;
	
	char &nbsp; m_cType;
	char * m_pRcvBuffer;
	char * m_pSndBuffer;
	DWORD &nbsp;m_dwBufferSize;
	
	SOCKET m_Sock;
	char &nbsp; m_cStatus;
	DWORD &nbsp;m_dwReadSize;
	DWORD &nbsp;m_dwTotalReadSize;
	char &nbsp; m_pAddr&#91;30&#93;;
	int &nbsp; &nbsp;m_iPortNum;

	char * m_pUnsentDataList&#91;DEF_XSOCKBLOCKLIMIT&#93;;
	int &nbsp; &nbsp;m_iUnsentDataSize&#91;DEF_XSOCKBLOCKLIMIT&#93;;
	short &nbsp;m_sHead, m_sTail;

	unsigned int m_uiMsg;
	HWND &nbsp; &nbsp; &nbsp; &nbsp; m_hWnd;

	int &nbsp; &nbsp;m_iBlockLimit;
&#125;;


BOOL _InitWinsock&#40;&#41;;
void _TermWinsock&#40;&#41;;

#endif &nbsp;!defined&#40;AFX_XSOCKET_H__F9D1BA42_7338_11D2_A8E6_00001C7030A6__INCLUDED_&#41;
i keep getting an error from this :/ lil mage you got by this? .. it feels like i'm missing something..
"<i>One night I was talking to God, but I realized I was talking to <u>myself</u></i>"<br><br><img src='http://img61.imageshack.us/img61/2678/untitled13bf.gif' border='0' alt='user posted image' /><br><br><b><u>Links</u></b><br>
DarkieDuck
Loyal fan
Posts: 441
Joined: Wed Feb 18, 2004 7:10 am

Post by DarkieDuck »

would be nice if i got see the error?



[edit]
try this:
include <windows.h>
becomes:
//include <windowsh>
[/edit]

hax
Post Reply