Please, How I get Full File Name(PATH and File Name) from HANDLE of API "CreateFile"?? Help...!!
raf sp
Posts
-
Get Full File Name from HANDLE of API "CreateFile" -
Count the number of pages in a PCL file.Ok, Thank´s!! I write a text file in "Notepad" and send to print to file in a PCL5 Printer Driver. Then, I execute the program for count pages pcl and it does not work.
-
Count the number of pages in a PCL file.I tried but, did not function. Thank you! raf-sp
-
Count the number of pages in a PCL file.This program should to show the number of pages a file it be printed in format HP-PCL. Does the while loop not find any ASCII 12 characters? No, no finds. raf-sp
-
Count the number of pages in a PCL file.The code below, would must to show the count the number of pages in a PCL file. But, don´t show. Why?? What is wrong?? //---------------------------------- #include "stdio.h" #include "stdlib.h" #include "string.h" int main (int argc, char **argv) { FILE *InputFile; char ch, EndTag, tag[2], *InputFileName; int n, BlockSize, Pages, Copies, Quiet; unsigned long FileSize, FilePos; BlockSize =0; Pages =0; FileSize =0; FilePos =0; Copies =0; Quiet =1; InputFileName = NULL; // Parse command line parameters for(n = 1; n <= argc - 1; n++) { if(! memcmp(argv[n], "-h", 2)) { printf("Error"); exit(0); } else if(! memcmp(argv[n], "-v", 2)) Quiet = 0; else if(argv[n][0] == '-') { fprintf(stderr, "-- Parameter incorrect: '%s'.\n", argv[n]); exit(1); } else InputFileName = argv[n]; } if(InputFileName == NULL) { fprintf(stderr, "-- Must enter a file name.\n \" Use 'pclcount -h' to get help.\n"); exit(1); } // Try to open the input file if(! (InputFile = fopen(InputFileName, "r"))) { fprintf(stderr, "--Error opening file: %s\n", argv[1]); exit(-1); }; // Get the file size, to show statistics if '-v' is passed if(! Quiet) { fseek(InputFile, 0, SEEK_END); FileSize = ftell(InputFile); fseek(InputFile, 0, SEEK_SET); } while(fread(&ch, 1, 1, InputFile)) { switch(ch) { case 12: // Found FormFeed: increments page counter Pages ++; break; case 27: // Found fread(tag, 2, 1, InputFile); if(! (memcmp(tag, "*b", 2) && memcmp(tag, "(s", 2) && memcmp(tag, ")s", 2) && memcmp(tag, "&p", 2))) { /* Detect the operators: *b###W -> Start of Binary Block (s###W -> Start of Characters Description Block )s###W -> Start of Fonts Description Block &p###X -> Start of non-printable Characters Block In these operators, '###' is the size of respective block. */ // Define the block end-character EndTag = memcm
-
How Create a Printer Port Monitor??Thank´s but, I don´t found this FAQ "How can I determine the status of the printer programmatically?" here. "now rest you have to make loop which check printer at regular interval". Please, you have some example?? Thank you!!
-
How Create a Printer Port Monitor??Please, How create a Printer Port Monitor?? I need to create this. Please help me!!! raf-sp
-
How Create a Printer Port Monitor??Please, How create a Printer Port Monitor?? I need to create this. Please help me!!! raf-sp
-
Array - Strings of Characters.Thank´s!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1111 :):):-D
-
Array - Strings of Characters.Please, what´s wrong?? Why the variable "xyz[1]" don´t assigning value "1"??? #include "windows.h" #include "stdio.h" #include "iostream.h" #include "string.h" #include "stdlib.h" char palav[8]; char xyz[6]; void main() { //(......) cout << "\n\n\nWrite a word : "; cin.getline (palav, 8, '\n'); switch (palav[0]) { case '"A"': xyz[1] = "1" case '"B"': xyz[1] = "2"; case '"C"': xyz[1] = "3"; case '"D"': xyz[1] = "4"; case '"E"': xyz[1] = "5"; case '"F"': xyz[1] = "6"; case '"G"': xyz[1] = "7"; case '"H"': xyz[1] = "8"; case '"I"': xyz[1] = "9"; case '"J"': xyz[1] = "0"; } cout << "Caracter1 " << xyz[1] << endl; //(.....) } erro: error C2440: '=' : cannot convert from 'char [1]' to 'char' This conversion requires a reinterpret_cast, a C-style cast or function-style cast. raf-sp@bol.com.br