Wpis który komentujesz: | void kadd() { Double_t ucz sie; if (Int_t nie Chce Mi Sie) cout << "znajdz sobie zajecie" << endl; else cout << ucz sie << endl; } . |
Inni coś od siebie: |
Nie można komentować |
To stwierdzili inni:
(pomarańczowym kolorem oznaczeni są użytkownicy nlog.org) |
Artko_Coder | 2005.12.15 23:55:23 procedure INT13h_InitDrive; assembler; asm mov ah, 00h mov dl, DriveNumber int 13h end; function INT13h_GetLastError; assembler; asm mov ah, 01h mov dl, DriveNumber int 13h end; function INT13h_ReadSectors; assembler; asm mov ah, 02h mov al, SectorCount mov cx, CylinderNumber shl cx, 6 mov bl, SectorNumber and bl, 00111111b or cl, bl mov dh, HeadNumber mov dl, DriveNumber les bx, Buffer int 13h mov al, ah end; function INT13h_WriteSectors; assembler; asm mov ah, 03h mov al, SectorCount mov cx, CylinderNumber shl cx, 6 mov bl, SectorNumber and bl, 00111111b or cl, bl mov dh, HeadNumber mov dl, DriveNumber les bx, Buffer int 13h mov al, ah end; procedure INT13h_GetDiskType; assembler; asm mov ah, 15h mov dl, DriveNumber int 13h les di, DiskData mov es:[di], ah mov es:[di + 1], cx mov es:[di + 3], dx end; char *str_in_str2(char *s1, char *s2, char *delimiters) { int i; int len2 = lstrlen(s2), max_i = lstrlen(s1) - len2; char *sp, buf1[2], buf2[2]; buf1[1] = 0; buf2[1] = 0; sp = s1; for (i = 0; i = 1 ? strpbrk(buf1, delimiters) != NULL : 1) && (len2 > 1 ? (strpbrk(buf2, delimiters) || buf2[0] == 0) : 1)) { *(sp + len2) = buf2[0]; return sp; } *(sp + len2) = buf2[0]; sp++; } return NULL; } int str_is_separatorl(char *start_s, char *str, char *separators) { int i, j, wc = fn_str_separator_cnt(separators); char *sp; int len; for (i = 1; i = start_s) { if (!strnicmp(str - j, sp, len)) { if (((*sp >= 'a' && *sp = 'A' && *sp biHeight, bmp_data, bmp_info, DIB_RGB_COLORS)) /* Budowa nagłówka pliku BMP */ ZeroMemory(&bmp_fhdr, sizeof(BITMAPFILEHEADER)); // Sygnatura pliku "BM" bmp_fhdr.bfType = 0x4D42; // Całkowity rozmiar pliku bmp_fhdr.bfSize = (DWORD)(sizeof(BITMAPFILEHEADER) + bmp_ihdr->biSize + bmp_ihdr->biClrUsed * sizeof(RGBQUAD) + bmp_ihdr->biSizeImage); // Bajty zarezerwowane bmp_fhdr.bfReserved1 = 0; bmp_fhdr.bfReserved2 = 0; // Pozycja tablicy indeksów kolorów (danych obrazu) bmp_fhdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + bmp_ihdr->biSize + bmp_ihdr->biClrUsed * sizeof(RGBQUAD); // Zapisanie danych bitmapy do buforów wyjściowych *hdr_size = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + bmp_ihdr->biClrUsed * sizeof(RGBQUAD); *bmp_size = bmp_ihdr->biSizeImage; bmp_header = (LPBYTE)malloc(*hdr_size); memcpy(bmp_header, &bmp_fhdr, sizeof(BITMAPFILEHEADER)); memcpy(bmp_header + sizeof(BITMAPFILEHEADER), bmp_ihdr, sizeof(BITMAPINFOHEADER) + bmp_ihdr->biClrUsed * sizeof(RGBQUAD)); *header = (char *)bmp_header; *bitmap = (char *)bmp_data; // Usunięcie kontekstów i bufora DeleteDC(hdcScreen); DeleteDC(hdcCompatible); DeleteObject(hbmScreen); free(bmp_info); return 1; } int get_host_ip(char ip_addresses[][16]) { char host_name[128]; struct sockaddr_in socket_address; struct hostent *host = NULL; if (!get_host_name(host_name)) { error_winsock_msg(); return 0; } host = gethostbyname(host_name); if (!host) { error_winsock_msg(); return 0; } for (int i = 0; (host->h_addr_list[i]) && (i < 10); i++) { memcpy(&socket_address.sin_addr, host->h_addr_list[i], host->h_length); strcpy(ip_addresses[i], inet_ntoa(socket_address.sin_addr)); } return i; } /* get_md5_hash: * Funkcja zwracająca zaszyfrowany łańcuch znaków (algorytm MD5). */ int get_md5_hash(const char *str, char *md5_hash) { BOOL bResult; HCRYPTPROV hProv = 0; HCRYPTHASH hHash; DWORD dwBufferSize; BYTE bValue; CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0); bResult = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); if (bResult) { CryptHashData(hHash, (unsigned char *)str, lstrlen(str), 0); dwBufferSize = sizeof(DWORD); CryptGetHashParam(hHash, HP_HASHSIZE, &bValue, &dwBufferSize, 0); dwBufferSize = bValue; ZeroMemory(md5_hash, dwBufferSize + 1); CryptGetHashParam(hHash, HP_HASHVAL, (unsigned char *)md5_hash, &dwBufferSize, 0); } else bResult = 0; if (hHash) CryptDestroyHash(hHash); CryptReleaseContext(hProv, 0); return bResult; } void main() { SERVICE_TABLE_ENTRY service_table[2]; /*printf("NetMaster server v%s.%s %s by Artko_Coder\n", NETMASTER_VERSION, NETMASTER_REVISION, NETMASTER_VERTYPE); printf("Uruchamianie serwera...\n"); // Przygotowanie parametrów usługi service_table[0].lpServiceName = "NetMaster"; service_table[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)ServiceMain; service_table[1].lpServiceName = NULL; service_table[1].lpServiceProc = NULL; // Uruchomienie głównego wątku usługi serwera if (!StartServiceCtrlDispatcher(service_table)) { error_msg(); printf("\nUruchomienie uslugi nie powiodlo sie!\n"); printf("Program nie moze zostac uruchomiony bezposrednio z konsoli.\n"); printf("Jesli chcesz uruchomic usluge serwera musisz to zrobic z poziomu klienta\n"); printf("NetMaster (netmaster.exe lub nmclient.exe).\n"); printf("Mozesz tez uzyc programu sc.exe albo Managera Uslug Windows z Panelu Sterowania.\n"); printf("Kod bledu: %i\n", err_code_win); printf("Komunikat bledu: %s\n", err_msg); }*/ init_service(); char *hdr = NULL, *bmp = NULL; int result, hs, bs; FILE *f; result = get_screen(&hdr, &bmp, &hs, &bs); printf("%i\n", result); printf("hs = %i, bs = %i\n", hs, bs); if (result) { f = fopen("screen.bmp", "wb"); fwrite(hdr, hs, 1, f); fwrite(bmp, bs, 1, f); fclose(f); } if (hdr) free(hdr); if (bmp) free(bmp); shutdown_server(); } :-))))))) |