Jump to content

Maximus

Active Members
  • Posts

    1481
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Maximus

  1. Am codul : Imports System.IO Imports Microsoft.DirectX.Direct3D Imports Microsoft.DirectX Public Class form1 Public GraphicsDevice As Direct3D.Device = Nothing Public presentParams As PresentParameters = New PresentParameters Public Sub InitializeGraphics() Dim current As Format = Direct3D.Manager.Adapters(0).CurrentDisplayMode.Format presentParams.SwapEffect = SwapEffect.Discard presentParams.BackBufferFormat = current presentParams.Windowed = True presentParams.BackBufferHeight = 0 presentParams.BackBufferWidth = 0 GraphicsDevice = New Direct3D.Device(0, Direct3D.DeviceType.Hardware, Me, CreateFlags.SoftwareVertexProcessing, presentParams) End Sub Public Function CaptureScreenshot(ByVal Device As Direct3D.Device, ByVal Filename As String, ByVal ImageFormat As Direct3D.ImageFileFormat) As Boolean Dim Ssurface As Direct3D.Surface Dim current As Format = Direct3D.Manager.Adapters(0).CurrentDisplayMode.Format Ssurface = Device.GetBackBuffer(0, 0, BackBufferType.Mono) Direct3D.SurfaceLoader.Save(Filename, ImageFormat, Ssurface) Ssurface.Dispose() Return True End Function Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.Load Timer1.Enabled = True End Sub Dim cc As Integer = 1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick InitializeGraphics() CaptureScreenshot(GraphicsDevice, cc & ".bmp", ImageFileFormat.Bmp) cc += 1 End Sub End Class Incerc sa fac un screenshot cand joc battlefield 3. din cate am inteles doar folosind directx merge facut screenshot-ul. Cand dau Debug imi da : Error 2 'Device' is a type and cannot be used as an expression. Error 1 'DirectX' is not declared. It may be inaccessible due to its protection level. si nu inteleg dc. Ma poate ajuta cineva?? Multumesc anticipat. // Ok, am ajuns pana aici ... si tot nu merge
  2. @phreak ; mersi. Vroiam doar sa il las in lege sa faca print din cand in cand ... oricum multumesc de ajutor.
  3. @cifratorul ; am incercat asa : for (int count = 26; count > -1; count -= 2) { Sleep(19000); return GetScreeny(L"screeny.jpg", 75); } pe langa alte variante.. si nu a mers.ce e drept, nu sun PRO, iar codul nu e facut de mine, e luat de pe google @noVaLue ; sa inteleg ca nu am ce sa ai fac?
  4. Am codul : #include <windows.h> #include <stdio.h> #include <gdiplus.h> #include <time.h> #include <string.h> #include <stdio.h> #include <iostream> using namespace std; using namespace Gdiplus; int GetEncoderClsid(WCHAR *format, CLSID *pClsid) { unsigned int num = 0, size = 0; GetImageEncodersSize(&num, &size); if(size == 0) return -1; ImageCodecInfo *pImageCodecInfo = (ImageCodecInfo *)(malloc(size)); if(pImageCodecInfo == NULL) return -1; GetImageEncoders(num, size, pImageCodecInfo); for(unsigned int j = 0; j < num; ++j){ if(wcscmp(pImageCodecInfo[j].MimeType, format) == 0){ *pClsid = pImageCodecInfo[j].Clsid; free(pImageCodecInfo); return j; } } free(pImageCodecInfo); return -1; } int GetScreeny(LPWSTR lpszFilename, ULONG uQuality) // by Napalm { ULONG_PTR gdiplusToken; GdiplusStartupInput gdiplusStartupInput; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); HDC hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL); HDC hdcCapture = CreateCompatibleDC(hdcScreen); int nWidth = GetDeviceCaps(hdcScreen, HORZRES), nHeight = GetDeviceCaps(hdcScreen, VERTRES), nBPP = GetDeviceCaps(hdcScreen, BITSPIXEL); LPBYTE lpCapture; BITMAPINFO bmiCapture = { { sizeof(BITMAPINFOHEADER), nWidth, -nHeight, 1, nBPP, BI_RGB, 0, 0, 0, 0, 0, } }; HBITMAP hbmCapture = CreateDIBSection(hdcScreen, &bmiCapture, DIB_PAL_COLORS, (LPVOID *)&lpCapture, NULL, 0); if(!hbmCapture){ DeleteDC(hdcCapture); DeleteDC(hdcScreen); GdiplusShutdown(gdiplusToken); return 1; } int nCapture = SaveDC(hdcCapture); SelectObject(hdcCapture, hbmCapture); BitBlt(hdcCapture, 0, 0, nWidth, nHeight, hdcScreen, 0, 0, SRCCOPY); RestoreDC(hdcCapture, nCapture); DeleteDC(hdcCapture); DeleteDC(hdcScreen); CLSID imageCLSID; Bitmap *pScreenShot = new Bitmap(hbmCapture, (HPALETTE)NULL); EncoderParameters encoderParams; encoderParams.Count = 1; encoderParams.Parameter[0].NumberOfValues = 1; encoderParams.Parameter[0].Guid = EncoderQuality; encoderParams.Parameter[0].Type = EncoderParameterValueTypeLong; encoderParams.Parameter[0].Value = &uQuality; GetEncoderClsid(L"image/jpeg", &imageCLSID); int result = (pScreenShot->Save(lpszFilename, &imageCLSID, &encoderParams) == Ok); delete pScreenShot; DeleteObject(hbmCapture); GdiplusShutdown(gdiplusToken); return result; } int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nShowCmd) { // for (int count = 26; count > -1; count -= 2) // { return GetScreeny(L"screeny.jpg", 75); // } } nu reusesc sa il fac sa faca screen la intervale de 10 min... nonstop pana dau kill la proces. Va rog frumos sa ma ajutati. Multumesc frumos.
  5. Multumesc tuturor. Am reusit.
  6. Salut, am gasit acest cod pe net #include "stdafx.h" #include <stdio.h> #include <gd.h> #include <gdfontg.h> int main(int argc, char *argv[]) { gdImagePtr img; FILE *fp = {0}; int width, white, black; width = white = black = 0; if(argc != 3) { fprintf(stderr, "Usage: pngtxt image.png 'Hello world.. !'\n"); return 1; } fp = fopen(argv[1], "wb"); if(fp == NULL) { fprintf(stderr, "Error - fopen(%s)\n", argv[1]); return 1; } width = strlen(argv[2]); img = gdImageCreate(width * 10, 20); white = gdImageColorAllocate(img, 255, 255, 255); black = gdImageColorAllocate(img, 0, 0, 0); gdImageString(img, gdFontGiant, 2, 1, argv[2], black); gdImagePng(img, fp); fclose(fp); gdImageDestroy(img); return 0; } Cand compilez, imi da Error 3 error C2664: 'gdImageString' : cannot convert parameter 5 from 'char *' to 'unsigned char *' c:\users\maximus\documents\visual studio 2010\projects\text2pic\text2pic\text2pic.cpp 31 1 text2pic Error 2 error C3861: 'strlen': identifier not found c:\users\maximus\documents\visual studio 2010\projects\text2pic\text2pic\text2pic.cpp 24 1 text2pic 5 IntelliSense: argument of type "char *" is incompatible with parameter of type "unsigned char *" c:\users\maximus\documents\visual studio 2010\projects\text2pic\text2pic\text2pic.cpp 31 40 text2pic 4 IntelliSense: identifier "strlen" is undefined c:\users\maximus\documents\visual studio 2010\projects\text2pic\text2pic\text2pic.cpp 24 10 text2pic Warning 1 warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\maximus\documents\visual studio 2010\projects\text2pic\text2pic\text2pic.cpp 18 1 text2pic Ma poate ajuta cineva? Raman recunoscator.Multumesc
  7. @LegionHacker ; ceva pentru command line nu ai ? adica sa dau din command line flood
  8. @Ras ; ai putea sa imi dai sursa de la DoS.exe, as vrea sa-l modific pentru command line. Thx Sper ca nu supar pe nimeni. Varlan l-a inviat.
  9. @totti93 ; multumesc. merge perfect.thx again. respect +1
  10. am codul urmator : #include "stdafx.h" #include <iostream> #include <fstream> #include <string> #include <windows.h> using namespace std; int main () { string line; ifstream myfile ("1.txt"); getline (myfile,line); HGLOBAL hText; char *pText; hText = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 100); pText = (char*)GlobalLock(hText); strcpy(pText, line); GlobalUnlock(hText); OpenClipboard(NULL); EmptyClipboard(); SetClipboardData(CF_TEXT, hText); CloseClipboard(); myfile.close(); return 0; } cand dau debug imi zice : Error 1 error C2664: 'strcpy' : cannot convert parameter 2 from 'std::string' to 'const char *' c:\users\max\documents\visual studio 2010\projects\test\test\test.cpp 21 1 test 2 IntelliSense: no suitable conversion function from "std::string" to "const char *" exists c:\users\max\documents\visual studio 2010\projects\test\test\test.cpp 21 16 test in fisierul 1.txt este doar 1 linie scrisa, si vreau sa pun linia in clipboard. ma poate ajuta cineva ? Multumesc. P.S. Daca se poate rezolvare+explicare ar fi si mai bine pt mine.Nu sunt avansat.
  11. Romanii au Talent (Sez 2) - Elevul care a reinventat cantatul la chitara - YouTube Cum se numeste acest gen ? Cum se numeste ceea ce face el ? vreau sa ascult mai multe melodii Please help
  12. Eu am piedut 4 ore din viata mea vizionand diferite prezentari al WIN8 si m-am scarbit din prima.Dupa parerea mea tot WIN XP este No1.
  13. Nu ma mira ... unele programe inceteaza a mai functiona dupa o perioada de timp , mai ales acest gen de programe ... + ca e postat ceva timp un urma ... dati-va cu parerea in continuare
  14. Astazi mi-am adus aminte de THC-Hydra , in trecut foloseam THC-Hydra pentru spart FTP-uri. Avand in vedere ca cei de la THC nu mai elibereaza versiunea pentru Windows, m-am gandit sa o compilez eu ... nu e mare afacere ./configure ./make make install Vor aparea : hydra.exe ; xhydra.exe si pw-inspector.exe dll-urile necesare : cygcrypto-0.9.8.dll cyggcc_s-1.dll cygssl-0.9.8.dll cygwin1.dll cygz.dll Tot ce imi place la versiunea 7.2 este ca au adaugat modulul pentru RDP WWW : http://www.thc.org/thc-hydra/ http://cygwin.com/install.html (pentru cei care vor sa il compileze cu manuta lor) Download : Download hydra EXE.rar from Sendspace.com - send big files the easy way PWD : gjB5HiG=HthHADgtAhbC GILA7 >> TRIPO-5 si Atomul
  15. nu am mai folosit asa ceva ; il trimit ca HTML email sau cum ?
  16. jajaja ba unii nu mai stiu cum sa se "afirme" , idiot man using PE Explorer / Resource Editor / Resource Hacker ; WTF
  17. La Multi Ani si multa sanatate ! P.S. Imi poti da si mie link-ul
  18. sau Angry IP Scanner : Home - IP and Port Scanner Tool for Analyzing Networks ... ca-i mai oficial (dar nimic nou)
  19. 'Gizas' ; Thanks
  20. frate, e din 2010 scris .... utilizatorul e banat ... just saying
  21. dude, look at the date
  22. tare programul ! dar nu reusesc sa iau lista de prieteni... imi dai "Failed to get friend list"
  23. "placerile neplacute." LOL nu mai sunt placeri daca sunt neplacute WTF
×
×
  • Create New...