Vous n'êtes pas identifié.
J'explique mon pb:
pr mon tpe je remet ça en faisant un prog de cryptage ... le pb c ke c vraiment tro tro chiant de faire l'interface et surtt le dos me saoule!! Or je maitrise assez bien la gui de delphi 7 et certaines fonctions bien utiles
http://leneuronez.free.fr/WinEncoder.exe ou encore http://leneuronez.free.fr/Equasolver.exe [faites pas attention aux messages pour celui là :mrd:]
Mais le pb, c'est que pour le cryptage ne lui même; rien ne vaut le C :mrgreen: Donc si qq1 pouvait m'indiquer la démarche pour exécuter des fichiers avec arguments si possible ça m'éviterait de faire 500 fichiers exe à partir de code Pascal Objet ça serait vraiment kewl
Merci d'avance!!!
Hors ligne
Si tu le fais sous windows t'as qu'à utiliser des fonction de l'API windows comme CreateProcess()
Hors ligne
ya aussi une fonction bien utile dans l'api windows (contenue dans Shell32.dll) qui s'appelle ShellExecute
HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd );
Explication:
hwnd - Handle to a parent window. This window receives any message boxes that an application produces. For example, an application may report an error by producing a message box. lpOperation Verb string that specifies the action to be performed. The set of available verbs depends on the particular file or folder. It includes the commands listed in the context menu and the registry. The following verbs are usually valid: "edit" Opens an editor. If lpFile is not a document file, the function will fail. "explore" The function explores the folder specified by lpFile. "open" The function opens the file specified by the lpFile parameter. The file can be an executable file or a document file. It can also be a folder. "print" The function prints the document file specified by lpFile. If lpFile is not a document file, the function will fail. "properties" Displays the file or folder's properties. This parameter can be NULL. In that case, the function opens the file specified by lpFile.
En l'occurence ce qui nous interesse c'est "open" (ou NULL)
lpFile Address of a null-terminated string that specifies the file to open or print or the folder to open or explore. The function can open an executable file or a document file. The function can print a document file. lpParameters If the lpFile parameter specifies an executable file, lpParameters is an address to a null-terminated string that specifies the parameters to be passed to the application. If lpFile specifies a document file, lpParameters should be NULL.
Et voila pour les parametres...
lpDirectory Address of a null-terminated string that specifies the default directory. nShowCmd If lpFile is a document file, nShowCmd should be zero. If lpFile is an executable file, nShowCmd determines how the application is displayed when it is opened. SW_HIDE Hides the window and activates another window. SW_MAXIMIZE Maximizes the specified window. SW_MINIMIZE Minimizes the specified window and activates the next top-level window in the z-order. SW_RESTORE Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window. SW_SHOW Activates the window and displays it in its current size and position. SW_SHOWDEFAULT Sets the show state based on the SW_ flag specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. An application should call ShowWindow with this flag to set the initial show state of its main window. SW_SHOWMAXIMIZED Activates the window and displays it as a maximized window. SW_SHOWMINIMIZED Activates the window and displays it as a minimized window. SW_SHOWMINNOACTIVE Displays the window as a minimized window. The active window remains active. SW_SHOWNA Displays the window in its current state. The active window remains active. SW_SHOWNOACTIVATE Displays a window in its most recent size and position. The active window remains active. SW_SHOWNORMAL Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
Ben alors la c'est les codes en C donc je sais pas si tu les as
enfin... les deux plus importants c'est
SW_SHOW = 5 SW_HIDE = 0
En fait tu fais SW_SHOW pour voir si ca fonctionne et ensuite quand tu es sur que ca fonctionne à 100% tu remplaces par SW_HIDE
Voila j'en ai foutu une tartine, tu essaies et tu me dis si ca fonctionne ou pas
Edit: Ah la la je pense a koi... g oublié de mettre un exemple... voila c'est réparé:
ShellExecute(NULL,"open","crypte.exe","fichier_a_crypter.dat",NULL,SW_SHOW);
Hors ligne
si tu veux un pote a fait un super prog de cryptage... si tu veux pas te faire chier je peux lui demander les sources, t'as juste a changer le nom du programmeur ;-)
Hors ligne
hmmm pka pa !!
lol non c sympa lol mais je veux pas par respect!! le gars c fe chier à le faire je vais pas prendre la source, appuyer sur un bouton et le présenter comme mon prog !! nonononon pas de ça ^^
Bon je v voir ske m'a dit m² !!
Hors ligne
ben yoré plus k'é étudier les sources !
Hors ligne
certaines personnes font des CS tellement clair, k'il fo mieu tout réécrire que comprendre...
moi compris :oops: jé retrouvé des vieux CS de college j'ai honte...
Hors ligne
utilise RSA smplifié, ça tue...
Hors ligne
bon alors ShellExecute sous Delphi ça marche IMPEC !!!
Ah des fois jme dis vive l'api win32 .... pour lancer mes modules DOS (x-th doit être mdr en lisant ça lol )
Merci bien mastermage
Screenshot d'hier soir:
http://leneuronez.free.fr/WinEncoder-ScrDev.gif (227Ko)
Hors ligne
et une démo qui crypte et décrypte en bcs (césar) et crypte en Xor :P
http://leneuronez.free.fr/Wnc-Release.rar
Hors ligne