Home » Developer & Programmer » Forms » Problem using Win_Api_Shell package. (Win_Api_Shell.winexec('charmap'))
Problem using Win_Api_Shell package. [message #273663] Thu, 11 October 2007 04:37 Go to next message
guestuser
Messages: 5
Registered: October 2007
Junior Member
Hello friends,


I want to call windows charmap.exe file from forms at runtime.
For doing this i wrote following code -
To see charmap application go to Start -> All programs -> Accessories -> System Tools -> Character Map

I created one form, placed 1 push button on the canvas. In the button's when-button-pressed trigger following code is written -

[color=blue]
Declare
    mpath varchar2(100);
    mfile varchar2(100);
Begin
   -- host('c:\windows\system32\charmap.exe');
   mpath := 'c:\windows\system32\';
   mfile := 'charmap';
   mfile := mpath||mfile;
   message(mfile); message(' ');
   Win_Api_Shell.winexec(mfile,WIN_API.SW_SHOWNORMAL,TRUE);
Exception
   when others then
     message(sqlerrm); message(' ');
End;[/color]

When i run this form & press the button. charmap process is started, which you can see in taskmanager list. But actually charmap application window is not opened.

Please suggest...

Thanks.

Mod-upd: Forget the 'color', just use the 'code' tags as requested in the sticky.

[Updated on: Fri, 12 October 2007 00:59] by Moderator

Report message to a moderator

Re: Problem using Win_Api_Shell package. [message #273860 is a reply to message #273663] Fri, 12 October 2007 01:04 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What version of Forms are you running?

David
Re: Problem using Win_Api_Shell package. [message #273908 is a reply to message #273860] Fri, 12 October 2007 03:23 Go to previous messageGo to next message
guestuser
Messages: 5
Registered: October 2007
Junior Member
I am using Forms 9.0.4.0.19 version & Oracle 9.2.
Re: Problem using Win_Api_Shell package. [message #274167 is a reply to message #273908] Sun, 14 October 2007 21:16 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Which 'dll' are you associating with your Forms 9 application to get 'win_api_shell' to run? I didn't think it was available in 'webutil'!

David
Re: Problem using Win_Api_Shell package. [message #274194 is a reply to message #274167] Mon, 15 October 2007 01:07 Go to previous messageGo to next message
guestuser
Messages: 5
Registered: October 2007
Junior Member
Hi David,
I am using 6i version d2kwutil.pll & it's d2kwut60.dll file is kept in oracle bin directory.

thanks.
Re: Problem using Win_Api_Shell package. [message #274222 is a reply to message #274194] Mon, 15 October 2007 02:23 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Last week you said you were using Forms 9. Which are you using Forms 6 or Forms 9?

David
Re: Problem using Win_Api_Shell package. [message #274289 is a reply to message #274222] Mon, 15 October 2007 06:49 Go to previous messageGo to next message
guestuser
Messages: 5
Registered: October 2007
Junior Member
Hi David,
It seems that i confused u....ok. Let me correct you, that i am using forms9i version (I just tried with 6i d2kwutil to check whether it works or not...now forget about 6i.)
I attached D2kwutil.pll to my form & used Win_Api_Shell packaged procedure. The process gets started by Win_Api_Shell.WinExec procedure, but i want to open & miximize the requested application.

Thanks.
Re: Problem using Win_Api_Shell package. [message #274375 is a reply to message #274289] Mon, 15 October 2007 21:14 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
If you go to the bottom of your Forms Builder / Object Navigator, under 'Built-in Packages' you will find 'ora_ffi', 'ole2', and 'dde'. Perhaps using one of these tools will access the MS application more easily and remove the need to mix an outdated and unsupported package (d2kwutil) with Forms 9.

Go to http://www.oracle.com/technology/documentation/forms.html. Find 'Guidelines for Building Applications'. Download it and search for 'ora_ffi', etc.

Also search this forum for 'ora_ffi', 'ole', and 'dll' To search for 'ole2' you will have to use the 'Advanced Search' page.

David
Re: Problem using Win_Api_Shell package. [message #274498 is a reply to message #274375] Tue, 16 October 2007 04:30 Go to previous messageGo to next message
guestuser
Messages: 5
Registered: October 2007
Junior Member
Hi David,

thanks my query is resolved....I attached Webutil.pll file to my form & put following code in When-Button-Pressed trigger. It opens the charmap.exe file..

begin
Webutil_host.host('charmap');
end;

thanks.
Re: Problem using Win_Api_Shell package. [message #274686 is a reply to message #274498] Tue, 16 October 2007 18:36 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Sorry for not suggesting the 'host' command, I thought that you wanted to keep 'charmap' open while navigating other fields on the screen.

David
Previous Topic: How do I make the control block entry populate the data block?
Next Topic: form status change
Goto Forum:
  


Current Time: Thu Dec 08 04:19:47 CST 2016

Total time taken to generate the page: 0.06431 seconds