Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Cobol > Re: Open Associ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 4062 of 4166
Post > Topic >>

Re: Open Associated file

by Kellie Fitton <KELLIEFITTON@[EMAIL PROTECTED] > Mar 19, 2008 at 01:09 PM

On Mar 19, 4:54=A0am, "Euro" <e...@[EMAIL PROTECTED]
> wrote:
> Fujitsu Power Cobol V7.0
>
> I try with this code:
>
> =A0 =A0 =A0 call "ShellExecuteA" with stdcall linkage
> =A0 =A0 =A0 =A0 =A0 using
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 by value 0 =A0 =A0 =A0*> window handle
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 by reference
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 open-command *> operation to perform
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 file-to-open *> document to open
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 by value 0 =A0 =A0 =A0 *> parameters (none
her=
e)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 by reference
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 default-directory, *> directory
(could=
 also be null)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 by value 0 =A0 =A0 =A0 *> SW-SHOWNORMAL show
t=
he file when open
> =A0 =A0 =A0 =A0 =A0 returning
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 se-hInstance =A0 =A0 *> not 'really' a
handle,=

> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*> more
an =
error return
> =A0 =A0 =A0 end-call
>
> I open all files less the MS office.
> Some reason?
>
> Thanks
> Joe


Hi,

You can use the following APIs to retrieve the name and handle of the
executable file associated with a specified filename (doc, xls, pps):

	FindExecutable()

	CreateProcess()

	WaitForSingleObject()

	CloseHandle()

http://msdn2.microsoft.com/en-us/library/ms647374.aspx

http://msdn2.microsoft.com/en-us/library/ms682425.aspx

http://msdn2.microsoft.com/en-us/library/ms687032.aspx

http://msdn2.microsoft.com/en-us/library/ms724211.aspx

Kellie.




 4 Posts in Topic:
Open Associated file
"Euro" <euo@  2008-03-19 11:54:51 
Re: Open Associated file
Kellie Fitton <KELLIEF  2008-03-19 13:09:59 
Re: Open Associated file
"Euro" <euo@  2008-03-20 11:01:17 
Re: Open Associated file
Kellie Fitton <KELLIEF  2008-03-20 10:22:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 4 16:46:06 CDT 2008.