ShellExecute with x86asm

Hi.I tried to use ShellExecute with inline x86asm in VC++.
My code is here:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// x86asm dosya calistirma deneme2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <windows.h>
int Calistir(char * dosyaadi) {

__asm{
PUSH 5                                ; SW_SHOW = 5
PUSH 0                                ; DefDir = NULL
PUSH 0                                ; Parameters = NULL
PUSH dosyaadi            ; FileName = "http://www.google.com"
PUSH 0                                ; Operation = NULL
PUSH 0                                ; hWnd = NULL
CALL ShellExecute
PUSH 0                                ; ExitCode = 0
CALL ExitProcess

}

}   

int main()
{
	Calistir("C:\\Ben.jpg");
	return 0;
}


But it taken this error:
http://tinypic.com/r/qs39g4/8

Thank you for your helps...
Last edited on
Have you generated the assembler for a C/C++ program that does what you want, and compared it with yours?
İ am working on big module.So i want to use this in module's some parts for faster than now position.
Topic archived. No new replies allowed.