|    
			
				23/11/2008, 20:20
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: noviembre-2008 
						Mensajes: 3
					 Antigüedad: 16 años, 11 meses Puntos: 0 |  | 
  |  Errores en codigo  
  Buenas, he estado intentando crear un dll (Es para agregar una funcion a un servidor de mu, luego de crear la DLL mi intencion es hookearla a un programa.) con un codigo que saque de un foro, pero no he podido. Me dan 2 errores y una advertencia.Aca tengo el codigo:
 
 // PostDLL2.cpp : Defines the entry point for the DLL application.
 //
 
 #include "stdafx.h"
 
 BOOL APIENTRY DllMain( HANDLE hModule,
 DWORD ul_reason_for_call,
 LPVOID lpReserved
 )
 {
 return TRUE;
 }
 
 
 __declspec(dllexport) LPCTSTR RetrievePost3(LPCTSTR szDirectory, LPCTSTR szPrefix)
 
 void DataSendAll(unsigned char* Packet, int Length)
 {
 for (int i=6400; i<7400; i++)
 if(gObjIsConnected(i))
 DataSend(i, Packet, Length);
 }
 
 void SendPost(int wId, LPCSTR Command, LPCSTR Text)
 {
 if (!IsPost) return;
 if (!gObjIsConnected(wId)) return;
 if (!strcmpi(Command, "/Post"))
 {
 MessageOutput(wId, "[%s] Useage: /Post <Msg>.", szPrefix);
 MessageOutput(wId, "[%s] Price for post: %d, Minimun Level: %d", szPrefix, PostCost, PostLevel);
 return;
 }
 gObj_SetInfo(wId);
 if (gObj.Level < PostLevel)
 {
 MessageOutput(wId, "[%s] You're level is too low to post!", szPrefix);
 return;
 }
 if (gObj.Money < PostCost)
 {
 MessageOutput(wId, "[%s] You don't have enough money to post!", szPrefix);
 return;
 }
 BYTE *Packet;
 char Message[100];
 Packet = (BYTE*) malloc(200);
 memset(Packet, 0x00, 200);
 *Packet = 0xC1;
 *(Packet+2) = 0x00;
 memcpy((Packet+3), gObj.Nick, strlen(gObj.Nick));
 sprintf(Message, "@@[Global] %s", Text);
 memcpy((Packet+13), Message, strlen(Message));
 int Len = (strlen(Message) + 0x13);
 *(Packet+1) = Len;
 DataSendAll(Packet, Len);
 int Amount = (gObj.Money - PostCost);
 gObj_Write(wId, gObj_Money, Amount);
 MoneySend(wId, Amount);
 free (Packet);
 }
 
 Aca los errores:
 
 
 C:\Archivos de programa\Microsoft Visual Studio\MyProjects\PostDLL\PostDLL.cpp(16) : warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored
 
 C:\Archivos de programa\Microsoft Visual Studio\MyProjects\PostDLL\PostDLL.cpp(16) : error C2146: syntax error : missing ';' before identifier 'DataSendAll'
 
 C:\Archivos de programa\Microsoft Visual Studio\MyProjects\PostDLL\PostDLL.cpp(16) : fatal error C1004: unexpected end of file found
 Error executing cl.exe.
 
 
 
 Alguien sabe como se arreglan??
 Gracias
     |