Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute to a C# exe fails - Access is denied
Message
From
12/10/2006 17:43:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01161572
Message ID:
01161598
Views:
17
>>>>>After compiling mytest.cs without an error, I run mytest.exe but nothing happens. Am supposed to see a window with a message? What am I doing wrong?
>>>>
>>>>No it's working there from command window:) Check temp folder. It should have created test.txt with "Hello from C#" in it.
>>>>Problem it fails if called from VFP via ShellExecute().
>>>>Cetin
>>>
>>>yes, you are correct. the file test.txt has been successfully created. Now, after I figure out how to run this .exe in ShellExecute in VFP, I will let you know what happens here.
>>
>>OK. Here is test code (assuming exe is c:\temp\test.exe):
>>
>>
>>DECLARE INTEGER ShellExecute IN shell32.dll ;
>> INTEGER hwnd, ;
>> STRING operation, ;
>> STRING file, ;
>> STRING params, ;
>> STRING workdir, ;
>> INTEGER showcmd
>>
>>? ShellExecute(0,"Open","c:\temp\test.exe",0,0,1)
>>
Hope you get something over 32 as return value.
>>Cetin
>
>I just sent you a message. And my code looks almost exactly as yours. And it works on my PC.
>
>Could it be that your PC is tired? <g> (given the late hour of your time)

Might be but it's not on this PC. On this one I don't have 2.0 yet and no VFP.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform