Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Wednesday, December 14, 2005

WinAPI::shellExecute() Method

Today I wanted to continue my post about the WinAPI class, and it's different methods. Something that is Very useful, and can be incorporated with launching websites, or other applications, etc. is the WinAPI::shellExecute() method. This method take variables, and based on what you send will launch as application, through the OS shell execute.

If anyone has every done any windows development, prior to or outside of X++, then most likely you have used the ShellExecute before.

Below is sample code that shows you how to launch IE, and feed IE a web site to launch, which happens to be a static HTML page in my c:\temp folder.

server static void WinAPITest(Args _args)
{
;
// WinAPI::shellExecute() returns an int value. 1 being that everything launched ok, 0 being a problem. (usually path, etc.)
// WinAPI::shellExecute(FileName _lpFile,[str _lpParameters, str _lpDirectory, str _lpOperation, int _show]);

// example
WinAPI::shellExecute("explorer.exe","c:\\temp\\TempInv.html","c:\\","",1);
}

If you copy and paste the above into a job, you will see the comments, and see it run like a champ! Of course instead of sending the static HTML page to launch you could also send an UNC path, or http:// path.

Well that's all for now!



Visit Hillstar Business Intelligence (www.HillstarBI.com) in order to truly unlock your data trapped in your Microsoft Dynamics investment. With our value driven business intelligence strategy Hillstar help you transform into a data informed company.


Find a job at: www.DynamicsAXJobs.com

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home


Copyright 2005-2011, J. Brandon George - All rights Reserved