flat assembler
Message board for the users of flat assembler.

Index > Windows > Can u help me?

Author
Thread Post new topic Reply to topic
dEwiL



Joined: 06 Jul 2004
Posts: 4
Location: Serbia & Montenegro
dEwiL
a week ago i started to learn asm and i have idea to write program which changes resolution to ex. 640x480 and loads .swf file and after playing, resolution is back to normal.....

i know that i'm asking too much, but i don't know anyone who knows fasm, and u are my only chance Smile

and can someone tell me how to run another exe from my program?

please help.... Smile

_________________
Powered by Slackware Linux
Post 13 Jul 2004, 23:55
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc
The easiest way is to use WinExec Smile

Code:
invoke WinExec, 'path\to\program.exe', WINDOW_MODE

; Window Modes (not 100% sure here):
; 0 (Hidden -- not shown in taskbar)
; 1 (Display -- normal)
; 2 (Display -- minimized)
; 3 (Display -- maximized)
    


Be sure to import WinExec from KERNEL32.DLL as well.
Post 14 Jul 2004, 00:50
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
The WinExec function is for 16bit compatability, if your running newer versions of windows you should use:

Code:
BOOL CreateProcess(
  LPCTSTR lpApplicationName,
  LPTSTR lpCommandLine,
  LPSECURITY_ATTRIBUTES lpProcessAttributes,
  LPSECURITY_ATTRIBUTES lpThreadAttributes,
  BOOL bInheritHandles,
  DWORD dwCreationFlags,
  LPVOID lpEnvironment,
  LPCTSTR lpCurrentDirectory,
  LPSTARTUPINFO lpStartupInfo,
  LPPROCESS_INFORMATION lpProcessInformation
);    


invoke CreateProcess,lpApplicationname,lpCommandLine,.....

NOTE:
If the executable module is a 16-bit application, lpApplicationName should be NULL, and the string pointed to by lpCommandLine should specify the executable module as well as its arguments.
Post 14 Jul 2004, 05:38
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc
CreateProcess is more complex to invoke though.
Post 14 Jul 2004, 10:33
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.