Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-11-2007, 07:57 AM
Junior Member
 
Join Date: May 2006
Posts: 20
Default change current directory..

Hi
Is is possible to change my working directory ?
Before I launch an external application I want to set working directory to where the external application locates.

The external application has its assets in its directory.
If I don't change working directory ,the app I launched can't load its assets.

Thank you
Reply With Quote
  #2 (permalink)  
Old 07-12-2007, 05:52 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:change current directory..

Yes, by using the Windows API ShellExecute, as shown in the following code

Code:
dllimport "shell32.dll" stdcall long ShellExecuteA(long, String, String, String, String, int) as shExec;
shExec(getMainWnd().handle, // handle of the main window
"open", // operation verb 
getAdditionalFile("my.exe"), // external application to run
"1.txt", // parameter
"c:\\temp", // work directory
/*SW_SHOW*/5);
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:26 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.