cs_cecel
Messages postés17Date d'inscriptionmercredi 26 février 2003StatutMembreDernière intervention27 avril 2006
-
25 nov. 2004 à 17:46
BruNews
Messages postés21040Date d'inscriptionjeudi 23 janvier 2003StatutModérateurDernière intervention21 août 2019
-
26 nov. 2004 à 09:14
Salut
Je devellope une appli qui permet d'imprimer des etiquettes sur une imprimante ZEBRA.
J'utilise un driver "Generic text" car j'imprime un fichier texte qui contient des instruction dans le langage de l'imprimante.
mon souci c'est que je ne sais pas si l'impression a abouti.
j'utilise le code suivant :
char prog[]="write /p c:\\temp\\test.zpl";
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
CreateProcess( NULL, // No module name (use command line).
(LPSTR)prog, // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) ;// Pointer to PROCESS_INFORMATION structure.
///cout << "CreateProcess rate."<<endl;
//
// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE );
// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
si quelqu'un a une solution pour savoir si l'impression c'est bien passé.