👤
a fost răspuns

Deci
Vreau un algoritm caruia sa-i atasez un fisier din pc, iar algoritmul ala, dupa ce il pornesc, sa-mi genereze fisierul ala pe desktop de n ori

CUM ATASEZ UN FISIER UNUI ALGORITM???


Răspuns :

S0unds

#include <windows.h> VOID startup(LPCTSTR lpApplicationName) { // additional information STARTUPINFO si; PROCESS_INFORMATION pi; // set the size of the structures ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( π, sizeof(pi) ); // start the program up CreateProcess( lpApplicationName, // the path argv[1], // 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 π // Pointer to PROCESS_INFORMATION structure (removed extra parentheses) ); // Close process and thread handles. CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); }