-
Fototrend

Új hozzászólás Aktív témák
-
amargo
addikt
Adott egy Win XP sp2.. Egy hálózatba kötött nyomtató (lehet ezzel van baj?), mivel még localisat nem sikerült beszereznem. Ennek a lekérdezésnek, akkor is mennie kellene a végén a loggolás már tényleg elég buta, de semmi változást nem ad. Persze ciklusba hívom a függvényt, de semmi változás. Mindig 0-t kapok csak.
//----------------------------------------------------------------
DWORD GetPrinterStatus( char* szPrnName )
{
HANDLE hHandle = 0; // Handle of the printer
DWORD dwStatus = 0; // Printer status we should receive
// Few values for example:
// 0x00000000 - ready
// 0x00000001 - paused
// 0x00000002 - error
// 0x00000200 - busy
// 0x00000400 - printing
// for more info please see MSDN
DWORD dwSize = 0; // Size of memory we should
// allocate for PRINTER_INFO_2
PRINTER_INFO_2* pPrnInfo2 = 0; // Structure specifies detailed
// printer information
DEVMODE DevMode = {0}; // Structure contains information
// about the device initialization
// and environment of a printer
PRINTER_DEFAULTS PrnDef = { 0, &DevMode, PRINTER_ACCESS_USE };
// Open printer with name szPrnName
if( !OpenPrinter( szPrnName, &hHandle, &PrnDef ) )
return 0; // Error
// How many memory should be allocated for printer data?
GetPrinter( hHandle, 2, 0, 0, &dwSize );
if( !dwSize )
return 0; // Error
// Allocate memory
pPrnInfo2 = (PRINTER_INFO_2*)malloc( dwSize );
// Receive printer details
if(!GetPrinter( hHandle, 2, (LPBYTE)pPrnInfo2, dwSize, &dwSize ))
return 0; // Error
dwStatus = pPrnInfo2->Status;
// Free allocated memory
free( pPrnInfo2 );
// Close printer
ClosePrinter( hHandle );
FILE *log;
log = fopen(''nyomtat.log'', ''a+'');
fputs((char*)&dwStatus, log);
fclose(log);
return dwStatus;
}
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- Futás, futópályák
- Kodi és kiegészítői magyar nyelvű online tartalmakhoz (Linux, Windows)
- Hobby elektronika
- BestBuy ruhás topik
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Honor Magic8 Pro - bevált recept kölcsönvett hozzávalókkal
- Háztartási gépek
- Fotók, videók mobillal
- S.T.A.L.K.E.R.: Call of Pripyat
- További aktív témák...
- iPhone 17 Pro Max - Pitaka Lucid Blue aramid tok eladó
- Lenovo IdeaPad 5 2-in-1 16IRU9 Laptop - 16" Touch, Intel Core i5 120U, 16 GB, 512 GB - Garanciával
- Eredeti fake/full kamu 1TB SSD + kamu 512GB sd cardel (ajándék)! Oktatás, blog, prezentációs célra!
- Erős (HP Omen 17) gamer Laptop! -i9 13900HX, RTX 4090 16gb/175w tgp, 32gb DDR5, 1tb SSD
- riello UPS SDH 3000 - Szünetmentes tápegység - 3000 VA -2U
- 15" MacBook Air M3 16GB RAM/ 512GB SSD - 27% ÁFA (0424AB)
- Dell Precision 3561 Core i9 11950H, 16-32GB RAM, 512GB SSD, jó akku, számla, 6 hó gar
- AKCIÓ! Asrock B450M R5 5500 8GB DDR4 256GB SSD GTX 1050 Ti 4GB Zalman T3 Plus DeepCool 400W
- DDR5 8/ 16/ 32GB 4800-5600MHz UDIMM PC RAM, több db- számla, garancia
- 267 - Lenovo ThinkBook 16 (G6 ABP) - AMD Ryzen 5 7530U, no GPU
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

