help for win_api_shell.winhelp [message #272502] |
Fri, 05 October 2007 05:05 |
realoneomer@gmail.com
Messages: 25 Registered: September 2007 Location: Islamabad
|
Junior Member |
|
|
hi every one
can any one tell me how win_api_shell.winhelp works in Oracle 10g
here is the code which i am using
declare
--
CurrItem varchar2(30) := get_item_property(:system.cursor_item, item_name) ;
--
x number ;
--
--cursor c1
--
cursor c1 is
select a.descr
from MmsPath a, MmsProgName b
where a.Co = :B0.Co
and b.ProgName = :B0.HelpFile
and a.Co = b.Co
and a.Path = b.Path ;
--
VPath varchar2(50);
--
begin
--
--checking if some error is shown
--
if :B0.LastError is not null then
--
--showing help for the specific error messages
--error number will be passed as parameter.
--
ShowHelp(:B0.LastError) ;
--
else --if :B0.LastError is not null
--
--if cursor is in some text field
--
if CurrItem is not null then
--
-- openning cursor c1 for getting physical path of the
-- help file.
--
open c1 ;
fetch c1 into VPath ;
close c1 ; -- closing cursor c1 ;
--
--Calling Function for getting help topic's ID
--stored against a particular field of block.
--
--Parameters for this procedure are
--
--1. Block Name
--2. Field Name
--
x := GetHelpId(get_item_property(:system.cursor_item, block_name), CurrItem) ;
--
--using windows api to display the help of the specific topic
--
-- win_api_shell.winhelp(VPath||:B0.HelpFile||'.hlp', x,win_api.help_context) ;
-- get_windows_directory(VPath||:B0.HelpFile||'.hlp', x,'win_api.help_context') ;
Host(VPath||:B0.HelpFile||'.hlp', x);--win_api.help_context) ;
--
end if ; --if curritem is not null
--
end if ; --if :B0.LastError is not null
--
end ;
Please tell me the solution
please urgent
Thanks
realoneomer@gmail.com
Upd-mod: Please use code tags.
[Updated on: Mon, 08 October 2007 01:24] by Moderator Report message to a moderator
|
|
|
|
Re: help for win_api_shell.winhelp [message #273354 is a reply to message #272863] |
Wed, 10 October 2007 02:13 |
realoneomer@gmail.com
Messages: 25 Registered: September 2007 Location: Islamabad
|
Junior Member |
|
|
Hi
I have migrated this form from Oracle form 6i but it is not working on oracle 10g after searching i came to know that win_Api_shell.winhelp not work in 10g enviroment is there any equivalent code please tell me
Thanks
Omer Shahzad
|
|
|
|
|
|
|
|
|
Re: help for win_api_shell.winhelp [message #275601 is a reply to message #275557] |
Mon, 22 October 2007 00:54 |
realoneomer@gmail.com
Messages: 25 Registered: September 2007 Location: Islamabad
|
Junior Member |
|
|
Package Body winhelp IS
lh_user ora_ffi.libHandleType;
fh_WinHelp ora_ffi.funcHandleType;
Function i_winhelp(funchandle IN ora_ffi.funcHandleType,
hwnd IN PLS_INTEGER,
helpfile IN OUT VARCHAR2,
command IN PLS_INTEGER,
data IN OUT VARCHAR2)
RETURN PLS_INTEGER;
PRAGMA INTERFACE(C,i_winhelp,11265);
Function winhelp(helpfile IN VARCHAR2,
command IN VARCHAR2,
data IN VARCHAR2)
RETURN PLS_INTEGER
IS
hwnd_l PLS_INTEGER;
helpfile_l VARCHAR2(512):= helpfile;
command_l PLS_INTEGER;
data_l VARCHAR2(512) := data;
rc PLS_INTEGER;
Function help_convert(command IN VARCHAR2)
return PLS_INteger
IS
BEGin
/*The Windows.h definations for command
Help_context 0*0001
Help_Quit 0*0002
Help_Index 0*0003
Help_Contents 0*0003
Help_HelponHelp 0*0004
Help_SetIndex 0*0005
Help_SetContents 0*0005
Help_ContextPOPUP 0*0008
Help_Forcefile 0*0009
Help_Key 0*0101
Help_command 0*0102
Help_Partialkey 0*0105
Help_Multikey 0*0201
Help_setwinpos 0*0203
--------------------------------------------------------------------------------------------*/
if command = 'help_context' then return(1);
end if;
if command = 'help_Index' then return(3);
end if;
if command = 'help_Contents' then return(3);
end if;
if command = 'help_helponhelp' then return(4);
end if;
if command = 'help_setidex' then return(5);
end if;
if command = 'help_setcontents' then return(5);
end if;
if command = 'help_contextpopup' then return(8);
end if;
if command = 'help_key' then return(101);
end if;
if command = 'help_partialkey' then return(105);
end if;
if command = 'help_setwinpos' then return(203);
end if;
if command = 'help_key' then return(257);
end if;
if command = 'help_partialkey' then return(261);
end if;
if command = 'help_quit' then return(2);
end if;
if command = 'help_multikey' then return(201);
end if;
/*If nothing else go to the contents page*/
return(3);
END;
Begin
hwnd_l :=
TO_NUMBER(get_item_property(name_in('System.cursor_ITEM'),window_handle));
command_l := help_convert(command);
rc := i_winhelp(fh_winhelp,hwnd_l,helpfile_l,command_l,data_l);
return(rc);
END;
Begin
Begin
lh_User := ora_ffi.find_library('wmp.dll');
EXCEPTION WHEN ora_ffi.FFI_ERROR THEN
lh_USER := ora_ffi.load_library('D:\DevSuiteHome_1\forms\java\oracle\forms\registry\wmplayer.chm','wmp.dll');
END;
fh_winhelp:=
ora_ffi.register_function(lh_user,'winhelp',ora_ffi.C_STD);
ora_ffi.register_parameter(fh_winhelp,ORA_FFI.C_INT);
/*HWND*/
ora_ffi.register_parameter(fh_winhelp,ORA_FFI.C_CHAR_PTR);
/*LPCSTR*/
ora_ffi.register_parameter(fh_winhelp,ORA_FFI.C_INT);
/*UINT*/
ora_ffi.register_parameter(fh_winhelp,ORA_FFI.C_CHAR_PTR);
/*DWORD*/
ora_ffi.register_return(fh_winhelp,ORA_FFI.C_INT);
END winhelp;
i am using above code but this is not working and it is not calling the any file when the program runs it calls default help of internet explorer
|
|
|