elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación C/C++ (Moderadores: Eternal Idol, Littlehorse, K-YreX)
| | |-+  (ayuda) copilar dll
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] 2 Ir Abajo Respuesta Imprimir
Autor Tema: (ayuda) copilar dll  (Leído 7,514 veces)
pirata711

Desconectado Desconectado

Mensajes: 12


Ver Perfil
(ayuda) copilar dll
« en: 4 Marzo 2015, 07:08 am »

hola necesaria si alguien me podría hacer el favor de copilar una dll para mi e tratado y visto todos los vídeos pero no logro hacerlo desde ya agradezco su tiempo.

esto me dijieron que copile

Código
  1. //ghost recon phantoms hack by Nseven
  2. //credits: scrapdizle, ntKid, Citadell, s0beit, google
  3.  
  4. #include <Windows.h>
  5. #include <fstream>
  6. #include <vector>
  7. #include <d3d9.h>
  8. #include <d3dx9.h>
  9. #pragma comment (lib, "d3dx9.lib")
  10. #pragma comment (lib, "d3d9.lib")
  11. #include <detours.h>
  12. using namespace std;
  13.  
  14. //=====================================================================================
  15.  
  16. // settings
  17. DWORD aimkey = VK_SHIFT; //aimkey
  18. int aimfov = 25; //aim fov in %
  19. float aimheight = 1.2f; //adjust aim height, 0 = feet
  20. int aimsens = 3; //aimsensitivity (high aim sensitivity is for high mouse sensitivity)
  21.  
  22. //device
  23. LPDIRECT3DDEVICE9 Device;
  24.  
  25. //init once
  26. bool FirstInit = false;
  27.  
  28. //vertexshader
  29. //IDirect3DVertexShader9* vShader;
  30. //UINT vSize;
  31.  
  32. //models
  33. bool BODY;
  34. bool HEAD;
  35.  
  36. //viewport
  37. D3DVIEWPORT9 Viewport;
  38.  
  39. //
  40. UINT mStartRegister;
  41. UINT mVector4fCount;
  42.  
  43. //=====================================================================================
  44.  
  45. typedef HRESULT (WINAPI* tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9 Device, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount);
  46. tDrawIndexedPrimitive oDrawIndexedPrimitive;
  47.  
  48. typedef HRESULT (WINAPI* tEndScene)(LPDIRECT3DDEVICE9 Device);
  49. tEndScene oEndScene;
  50.  
  51. typedef HRESULT (WINAPI* tReset) (LPDIRECT3DDEVICE9 Device, D3DPRESENT_PARAMETERS *pPresentationParameters);
  52. tReset oReset;
  53.  
  54. typedef HRESULT(__stdcall* tCreateQuery)(LPDIRECT3DDEVICE9 Device, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery);
  55. tCreateQuery oCreateQuery;
  56.  
  57. typedef HRESULT(__stdcall* tSetVertexShaderConstantF)(LPDIRECT3DDEVICE9 Device, UINT StartRegister, const float *pConstantData, UINT Vector4fCount);
  58. tSetVertexShaderConstantF oSetVertexShaderConstantF;
  59.  
  60. //=====================================================================================
  61.  
  62. LPDIRECT3DTEXTURE9    texRed, texYellow, texBlue;
  63. HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
  64. {
  65. if (FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)))
  66. return E_FAIL;
  67.  
  68. WORD colour16 = ((WORD)((colour32 >> 28) & 0xF) << 12)
  69. | (WORD)(((colour32 >> 20) & 0xF) << 8)
  70. | (WORD)(((colour32 >> 12) & 0xF) << 4)
  71. | (WORD)(((colour32 >> 4) & 0xF) << 0);
  72.  
  73. D3DLOCKED_RECT d3dlr;
  74. (*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
  75. WORD *pDst16 = (WORD*)d3dlr.pBits;
  76.  
  77. for (int xy = 0; xy < 8 * 8; xy++)
  78. *pDst16++ = colour16;
  79.  
  80. (*ppD3Dtex)->UnlockRect(0);
  81.  
  82. return S_OK;
  83. }
  84.  
  85. //=====================================================================================
  86.  
  87. void DrawPoint(LPDIRECT3DDEVICE9 Device, int baseX, int baseY, int baseW, int baseH, D3DCOLOR Cor)
  88. {
  89. D3DRECT BarRect = { baseX, baseY, baseX + baseW, baseY + baseH };
  90. Device->Clear(1, &BarRect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, Cor, 0, 0);
  91. }
  92.  
  93. void DrawCornerBox(LPDIRECT3DDEVICE9 Device, int x, int y, int w, int h, int borderPx, DWORD borderColor) //with x,y being the center of the box
  94. {
  95. DrawPoint(Device, x - (w / 2), (y - h + borderPx), w / 3, borderPx, borderColor); //bottom
  96. DrawPoint(Device, x - (w / 2) + w - w / 3, (y - h + borderPx), w / 3, borderPx, borderColor); //bottom
  97. DrawPoint(Device, x - (w / 2), (y - h + borderPx), borderPx, w / 3, borderColor); //left
  98. DrawPoint(Device, x - (w / 2), (y - h + borderPx) + h - w / 3, borderPx, w / 3, borderColor); //left
  99. DrawPoint(Device, x - (w / 2), y, w / 3, borderPx, borderColor); //top
  100. DrawPoint(Device, x - (w / 2) + w - w / 3, y, w / 3, borderPx, borderColor); //top
  101. DrawPoint(Device, (x + w - borderPx) - (w / 2), (y - h + borderPx), borderPx, w / 3, borderColor);//right
  102. DrawPoint(Device, (x + w - borderPx) - (w / 2), (y - h + borderPx) + h - w / 3, borderPx, w / 3, borderColor);//right
  103. }
  104.  
  105. //=====================================================================================
  106.  
  107. //   Name               Reg   Size
  108. //   ------------------ ----- ----
  109. //   g_mObjectToView    c0       3
  110. //   g_mProjection      c4       4
  111. //   gaf_UnpackPosInfos c118     1
  112.  
  113. struct ModelInfo_t
  114. {
  115. D3DXVECTOR3 Position2D;
  116. D3DXVECTOR3 Position3D;
  117. float CrosshairDistance;
  118. };
  119. vector<ModelInfo_t*>ModelInfo;
  120.  
  121. float GetDistance(float Xx, float Yy, float xX, float yY)
  122. {
  123. return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx));
  124. }
  125.  
  126. void Worldtoscreen(LPDIRECT3DDEVICE9 Device)
  127. {
  128. ModelInfo_t* pModel = new ModelInfo_t;
  129.  
  130. D3DXMATRIX g_mProjection, g_mObjectToView, BSMatrix;
  131. D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, 0, (float)aimheight);
  132. pModel->Position3D = ScreenMiddle;
  133.  
  134. Device->GetVertexShaderConstantF(4, g_mProjection, 4);
  135. Device->GetVertexShaderConstantF(0, g_mObjectToView, 3);
  136.  
  137. D3DXMatrixIdentity(&BSMatrix);
  138. D3DXMatrixTranspose(&g_mObjectToView, &g_mObjectToView);
  139. D3DXMatrixTranspose(&g_mProjection, &g_mProjection);
  140.  
  141. //D3DXVec3Unproject(&VectorMiddle, &ScreenMiddle, &Viewport, &g_mProjection, &g_mObjectToView, &BSMatrix);
  142. D3DXVec3Project(&VectorMiddle, &pModel->Position3D, &Viewport, &g_mProjection, &g_mObjectToView, &BSMatrix);
  143.  
  144. pModel->Position2D.x = VectorMiddle.x;
  145. pModel->Position2D.y = VectorMiddle.y;
  146.  
  147. ModelInfo.push_back(pModel);
  148. }
  149.  
  150. //=====================================================================================
  151.  
  152. HRESULT __stdcall hkSetVertexShaderConstantF(LPDIRECT3DDEVICE9 Device, UINT StartRegister, const float *pConstantData, UINT Vector4fCount)
  153. {
  154. HRESULT hRet;
  155.  
  156. if (Device == nullptr)
  157. return oSetVertexShaderConstantF(Device, StartRegister, pConstantData, Vector4fCount);
  158.  
  159. if (pConstantData == NULL)
  160. return oSetVertexShaderConstantF(Device, StartRegister, pConstantData, Vector4fCount);
  161.  
  162. hRet = (HRESULT)oSetVertexShaderConstantF(Device, StartRegister, pConstantData, Vector4fCount);
  163.  
  164. if (SUCCEEDED(hRet))
  165. {
  166. mStartRegister = StartRegister;
  167. mVector4fCount = Vector4fCount;
  168. }
  169.  
  170. return hRet;
  171. }
  172.  
  173. //=====================================================================================
  174.  
  175. HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 Device, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
  176. {
  177. //HRESULT hRet;
  178.  
  179. if (FirstInit == FALSE)
  180. {
  181. GenerateTexture(Device, &texRed, D3DCOLOR_ARGB(255, 255, 0, 0));
  182. GenerateTexture(Device, &texYellow, D3DCOLOR_ARGB(255, 255, 255, 0));
  183. GenerateTexture(Device, &texBlue, D3DCOLOR_ARGB(255, 0, 0, 255));
  184.  
  185. FirstInit = TRUE;
  186. }
  187.  
  188. /*
  189. //get vSize
  190. hRet = Device->GetVertexShader(&vShader);
  191. if (SUCCEEDED(hRet) && vShader != NULL)
  192. {
  193. hRet = vShader->GetFunction(NULL, &vSize);
  194. if (SUCCEEDED(hRet) && vShader != NULL)
  195. {
  196. vShader->Release();
  197. vShader = NULL;
  198. }
  199. }
  200.  
  201. //model rec
  202. //body near //video settings
  203. if ((vSize == 3712) || //high
  204. (vSize == 3404) //med, low & very low
  205. ||
  206. //body far
  207. (vSize == 2524) || //med & high
  208. (vSize == 2488)) //low & very low
  209. BODY = true;
  210. else BODY = false;
  211.  
  212. //head near //video settings
  213. if ((vSize == 3592) || //high
  214. (vSize == 3308) //med, low & very low
  215. ||
  216. //head far
  217. (vSize == 3308) || //med & high
  218. (vSize == 3272) || //low & very low
  219. (vSize == 3672)) //main menu chara
  220. HEAD = true;
  221. else HEAD = false;
  222. */
  223.  
  224. //head
  225. if (mStartRegister == 128)
  226. HEAD = true;
  227. else HEAD = false;
  228.  
  229. //body
  230. if (mStartRegister == 192 || mStartRegister == 131)
  231. BODY = true;
  232. else BODY = false;
  233.  
  234. //worldtoscreen (head chams can f.up aim)
  235. if (HEAD)
  236. {
  237. Worldtoscreen(Device);
  238. }
  239.  
  240. //chams
  241. if (BODY)
  242. {
  243. Device->SetTexture(0, texRed);
  244. //Device->SetTexture(1, texRed);
  245. Device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
  246. oDrawIndexedPrimitive(Device, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
  247. Device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
  248. Device->SetTexture(0, texBlue);
  249. }
  250.  
  251. return oDrawIndexedPrimitive(Device, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
  252. }
  253.  
  254. //=====================================================================================
  255.  
  256. HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 Device)
  257. {
  258. //aimbot & esp
  259. Device->GetViewport(&Viewport);
  260. if (ModelInfo.size() != NULL)
  261. {
  262. UINT BestTarget = -1;
  263. DOUBLE fClosestPos = 99999;
  264.  
  265. for (size_t i = 0; i < ModelInfo.size(); i += 1)
  266. {
  267. //drawbox on targets (Esp)
  268. if (ModelInfo[i]->Position2D.x > 1 || ModelInfo[i]->Position2D.y > 1)
  269. {
  270. DrawCornerBox(Device, (int)ModelInfo[i]->Position2D.x, (int)ModelInfo[i]->Position2D.y+20, 20, 30, 1, D3DCOLOR_ARGB(255, 255, 255, 0));
  271. }
  272.  
  273. //get screen center
  274. float ScreenCenterX = Viewport.Width / 2.0f;
  275. float ScreenCenterY = Viewport.Height / 2.0f;
  276.  
  277. //aimfov
  278. float radiusx = aimfov * (ScreenCenterX / 100);
  279. float radiusy = aimfov * (ScreenCenterY / 100);
  280.  
  281. //get crosshairdistance
  282. ModelInfo[i]->CrosshairDistance = GetDistance(ModelInfo[i]->Position2D.x, ModelInfo[i]->Position2D.y, ScreenCenterX, ScreenCenterY);
  283.  
  284. //if in fov
  285. if (ModelInfo[i]->Position2D.x >= ScreenCenterX - radiusx && ModelInfo[i]->Position2D.x <= ScreenCenterX + radiusx && ModelInfo[i]->Position2D.y >= ScreenCenterY - radiusy && ModelInfo[i]->Position2D.y <= ScreenCenterY + radiusy)
  286.  
  287. //get closest/nearest target to crosshair
  288. if (ModelInfo[i]->CrosshairDistance < fClosestPos)
  289. {
  290. fClosestPos = ModelInfo[i]->CrosshairDistance;
  291. BestTarget = i;
  292. }
  293. }
  294.  
  295. //if nearest target to crosshair
  296. if (BestTarget != -1)
  297. {
  298. double DistX = ModelInfo[BestTarget]->Position2D.x - Viewport.Width / 2.0f;
  299. double DistY = ModelInfo[BestTarget]->Position2D.y - Viewport.Height / 2.0f;
  300.  
  301. //aimsmooth
  302. DistX /= aimsens;
  303. DistY /= aimsens;
  304.  
  305. //if aimkey is pressed
  306. if ((GetAsyncKeyState(aimkey) & 0x8000))
  307. mouse_event(MOUSEEVENTF_MOVE, (DWORD)DistX, (DWORD)DistY, NULL, NULL); //doaim, move mouse to x & y
  308. }
  309.  
  310. ModelInfo.clear();
  311. }
  312.  
  313. return oEndScene(Device);
  314. }
  315.  
  316. //=====================================================================================
  317.  
  318. HRESULT WINAPI hkReset(LPDIRECT3DDEVICE9 Device, D3DPRESENT_PARAMETERS *pPresentationParameters)
  319. {
  320. HRESULT hRet = oReset(Device, pPresentationParameters);
  321.  
  322. if (hRet == D3D_OK)
  323. {
  324.  
  325. }
  326.  
  327. if (SUCCEEDED(hRet))
  328. {
  329.  
  330. }
  331.  
  332. return hRet;
  333. }
  334.  
  335. //=====================================================================================
  336.  
  337. class CFakeQuery : public IDirect3DQuery9
  338. {
  339. public:
  340. HRESULT WINAPI QueryInterface(REFIID riid, void** ppvObj)
  341. {
  342. return D3D_OK;
  343. }
  344.  
  345. ULONG WINAPI AddRef()
  346. {
  347. m_ref++;
  348.  
  349. return m_ref;
  350. }
  351.  
  352. ULONG WINAPI Release()
  353. {
  354. return 1;
  355. }
  356.  
  357. HRESULT WINAPI GetDevice(IDirect3DDevice9 **ppDevice)
  358. {
  359. return D3D_OK;
  360. }
  361.  
  362. D3DQUERYTYPE WINAPI GetType()
  363. {
  364. return m_type;
  365. }
  366.  
  367. DWORD WINAPI GetDataSize()
  368. {
  369. return sizeof(DWORD);
  370. }
  371.  
  372. HRESULT    WINAPI Issue(DWORD dwIssueFlags)
  373. {
  374. return D3D_OK;
  375. }
  376.  
  377. HRESULT WINAPI GetData(void* pData, DWORD dwSize, DWORD dwGetDataFlags)
  378. {
  379. DWORD* pdwData = (DWORD*)pData;
  380.  
  381. *pdwData = 500; //500 pixels visible
  382.  
  383. return D3D_OK;
  384. }
  385.  
  386. int                m_ref;
  387. D3DQUERYTYPE    m_type;
  388. };
  389.  
  390. //=====================================================================================
  391.  
  392. HRESULT __stdcall hkCreateQuery(LPDIRECT3DDEVICE9 Device, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery)
  393. {
  394. if (Type == D3DQUERYTYPE_OCCLUSION)
  395. {
  396. *ppQuery = new CFakeQuery;
  397.  
  398. ((CFakeQuery*)*ppQuery)->m_type = Type;
  399.  
  400. return D3D_OK;
  401. }
  402.  
  403. return oCreateQuery(Device, Type, ppQuery);
  404. }
  405.  
  406. //=====================================================================================
  407.  
  408. LRESULT CALLBACK MsgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
  409. {
  410. return DefWindowProc(hwnd, uMsg, wParam, lParam);
  411. }
  412.  
  413. //=====================================================================================
  414.  
  415. DWORD* pVTable;
  416. void DX_Init(DWORD* table)
  417. {
  418. WNDCLASSEX wc = { sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(NULL),NULL,NULL,NULL,NULL,"DX",NULL};
  419. RegisterClassEx(&wc);
  420. HWND hWnd = CreateWindow("DX",NULL,WS_OVERLAPPEDWINDOW,100,100,300,300,GetDesktopWindow(),NULL,wc.hInstance,NULL);
  421. LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
  422. D3DPRESENT_PARAMETERS d3dpp;
  423. ZeroMemory( &d3dpp, sizeof(d3dpp) );
  424. d3dpp.Windowed = TRUE;
  425. d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
  426. d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
  427.  
  428. pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&Device);
  429. pVTable = (DWORD*)Device;
  430. pVTable = (DWORD*)pVTable[0];
  431.  
  432. DestroyWindow(hWnd);
  433. }
  434.  
  435. //=====================================================================================
  436.  
  437. HMODULE hmRendDx9Base = NULL;
  438. DWORD WINAPI DxHook(LPVOID)
  439. {
  440. DWORD VTable[3] = {0};
  441.  
  442. while(hmRendDx9Base == NULL)
  443. {
  444. hmRendDx9Base = GetModuleHandleA("d3d9.dll");
  445. Sleep(250);
  446. }
  447. CloseHandle(hmRendDx9Base);
  448.  
  449. DX_Init(VTable);
  450. oDrawIndexedPrimitive = (tDrawIndexedPrimitive)DetourFunction((BYTE*)pVTable[82], (BYTE*)hkDrawIndexedPrimitive);
  451. oEndScene = (tEndScene)DetourFunction((BYTE*)pVTable[42], (BYTE*)hkEndScene);
  452. oSetVertexShaderConstantF = (tSetVertexShaderConstantF)DetourFunction((BYTE*)pVTable[94], (BYTE*)hkSetVertexShaderConstantF);
  453. oCreateQuery = (tCreateQuery)DetourFunction((BYTE*)pVTable[118], (BYTE*)hkCreateQuery);
  454. //oReset = (tReset)DetourFunction((BYTE*)pVTable[16], (BYTE*)hkReset);
  455. return 0;
  456. }
  457.  
  458. //=====================================================================================
  459.  
  460. BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ulReason, LPVOID lpReserved )
  461. {
  462. switch (ulReason)
  463. {
  464. case DLL_PROCESS_ATTACH:
  465. {
  466. DisableThreadLibraryCalls(hModule);
  467.  
  468. CreateThread(NULL, NULL, DxHook, NULL, NULL, NULL);
  469. }
  470. break;
  471. case DLL_PROCESS_DETACH:
  472. case DLL_THREAD_ATTACH:
  473. case DLL_THREAD_DETACH:
  474. break;
  475. }
  476. return TRUE;
  477. }

Mod: Usa etiquetas GeSHi para publicar codigo y publica en el subforo adecuado... modificado y movido


« Última modificación: 4 Marzo 2015, 07:11 am por engel lex » En línea

pirata711

Desconectado Desconectado

Mensajes: 12


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #1 en: 5 Marzo 2015, 18:02 pm »

nadie que pueda ayudarme?


En línea

pirata711

Desconectado Desconectado

Mensajes: 12


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #2 en: 6 Marzo 2015, 01:09 am »

bueno gracias a todos por ayudarme, buscare ayuda en otro lado.
En línea

BloodSharp


Desconectado Desconectado

Mensajes: 804


El Messi-Vegeta :D


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #3 en: 6 Marzo 2015, 01:24 am »

¿Tenés la librerías detours y la d3d sdk bien adjuntadas en el proyecto? Sino va a ser imposible que puedas compilar sin errores esa dll...


B#
En línea



pirata711

Desconectado Desconectado

Mensajes: 12


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #4 en: 9 Marzo 2015, 02:58 am »

si las tengo a las 2 (gracias por responder :) ) el DirectX SDK el descargable de junio del 2010 que ya l tengo y el Detour tambien lo tengo queres que te deje los link de descarga?
En línea

MCKSys Argentina
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.471


Diviértete crackeando, que para eso estamos!


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #5 en: 9 Marzo 2015, 05:18 am »

Y qué errores te tira el compilador?
En línea

MCKSys Argentina

"Si piensas que algo está bien sólo porque todo el mundo lo cree, no estás pensando."

pirata711

Desconectado Desconectado

Mensajes: 12


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #6 en: 9 Marzo 2015, 05:34 am »

Compiling project changes...
--------
- Project Filename: C:\Users\Intrepido\Documents\Proyecto1.dev
- Compiler Name: TDM-GCC 4.8.1 64-bit Release

Building makefile...
--------
- Filename: C:\Users\Intrepido\Documents\Makefile.win

Processing makefile...
--------
- Makefile Processor: C:\Program Files (x86)\Dev-Cpp\MinGW64\bin\mingw32-make.exe
- Command: mingw32-make.exe -f "C:\Users\Intrepido\Documents\Makefile.win" all

g++.exe -c dllmain.cpp -o dllmain.o -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.8.1/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++" -DBUILDING_DLL=1

dllmain.cpp: In function 'HRESULT hkSetVertexShaderConstantF(LPDIRECT3DDEVICE9, UINT, const float*, UINT)':
dllmain.cpp:156:16: error: 'nullptr' was not declared in this scope
  if (Device == nullptr)
                ^

dllmain.cpp: In function 'void DX_Init(DWORD*)':
dllmain.cpp:430:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  pVTable = (DWORD*)pVTable[0];
                             ^
dllmain.cpp: In function 'DWORD DxHook(LPVOID)':
dllmain.cpp:450:81: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  oDrawIndexedPrimitive = (tDrawIndexedPrimitive)DetourFunction((BYTE*)pVTable[82], (BYTE*)hkDrawIndexedPrimitive);
                                                                                 ^
dllmain.cpp:451:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  oEndScene = (tEndScene)DetourFunction((BYTE*)pVTable[42], (BYTE*)hkEndScene);
                                                         ^
dllmain.cpp:452:89: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  oSetVertexShaderConstantF = (tSetVertexShaderConstantF)DetourFunction((BYTE*)pVTable[94], (BYTE*)hkSetVertexShaderConstantF);
                                                                                         ^
dllmain.cpp:453:64: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  oCreateQuery = (tCreateQuery)DetourFunction((BYTE*)pVTable[118], (BYTE*)hkCreateQuery);
                                                                ^

C:\Users\Intrepido\Documents\Makefile.win:30: recipe for target 'dllmain.o' failed

mingw32-make.exe: *** [dllmain.o] Error 1


Compilation results...
--------
- Errors: 1
- Warnings: 5
- Compilation Time: 2,25s



y esta linea sale en rojo ( if (Device == nullptr) )
« Última modificación: 9 Marzo 2015, 05:36 am por pirata711 » En línea

BloodSharp


Desconectado Desconectado

Mensajes: 804


El Messi-Vegeta :D


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #7 en: 9 Marzo 2015, 06:45 am »

Un par de cosas te señalo:

1. Probá reemplazar todos los nullptr por NULL que encuentres...

2. Tené en cuenta que cuando estás hookeando rutinas de una clase (CFakeQuery) el código de la convención de llamadas en Mingw y los compiladores de Microsoft (me refiero a la manera en que lo ensambla) es distinto: MingW envía el puntero del objeto a la stack como otro parametro extra mientras que Visual studio lo manda a un registro (creo que era edx). En castellano puede que cuando se ejecute el código de tu dll no funcione o provoque errores, por lo que recomiendo que cambies de compilador si querés hookear d3d...

3. Eso es Mingw de 64 bits? Te fijaste que al juego que quieras inyectarle esa dll esté hecho en 32 o 64 bits primero?

4. Algo que tengo sabido (por experiencia :P) es que no siempre metás copiar, pegar y compilar todo el código que encuentres sobre hacks debido a que siempre algún que otro error siempre le ponen para que justamente no hagas copy/paste y mirés como funciona el juego... Lo mejor es siempre tomar el código como referencia y armar tu propia dll desde cero sabiendo que funciona parte por parte perfectamente.


B#
« Última modificación: 9 Marzo 2015, 06:49 am por BloodSharp » En línea



pirata711

Desconectado Desconectado

Mensajes: 12


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #8 en: 9 Marzo 2015, 07:14 am »

el del problema soy yo los de mas lo pudieron hacer bien si te paso las cosas te fijas si vos lo podes copilar por favor
En línea

MCKSys Argentina
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.471


Diviértete crackeando, que para eso estamos!


Ver Perfil
Re: (ayuda) copilar dll
« Respuesta #9 en: 9 Marzo 2015, 15:39 pm »

Tenés 1 solo error y por eso no compila. Los demás son Warnings.

nullptr no está definido en el ámbito de esa función. Si hay un .h que tiene la definición, tenés que incluirlo. Sinó reemplázalo por NULL como te dijo BloodSharp.

Saludos!
En línea

MCKSys Argentina

"Si piensas que algo está bien sólo porque todo el mundo lo cree, no estás pensando."

Páginas: [1] 2 Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
copilar en html .net 2008 « 1 2 »
.NET (C#, VB.NET, ASP)
rembolso 12 6,407 Último mensaje 25 Julio 2009, 04:09 am
por rembolso
¿?copilar¿? WTF? « 1 2 »
Programación General
Jeypestylerz 13 6,444 Último mensaje 2 Octubre 2010, 01:07 am
por Littlehorse
Copilar para 16Bits con Borland C 5.02
Programación C/C++
germangelv 2 2,768 Último mensaje 29 Noviembre 2011, 19:50 pm
por germangelv
error al copilar en delphi
Programación General
Masterx2010 2 2,190 Último mensaje 6 Agosto 2014, 16:28 pm
por tincopasan
MOVIDO: error al copilar en delphi
Ingeniería Inversa
.:UND3R:. 0 1,587 Último mensaje 6 Agosto 2014, 17:20 pm
por .:UND3R:.
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines