1. Re: accessing interrupts

I have all of those things written in 16bit assembler that dont use default dos
calls if you want them
else,

--start example--
include win32lib.ew -- or comment this out if you dont like win32lib
without warning

atom lib
integer jJumpto    --id
if platform() = WIN32 then
lib = open_dll("shell32.dll")
jJumpto = define_c_func(lib,"ShellExecuteA",
  {C_INT,C_POINTER,C_POINTER,C_POINTER,C_POINTER,C_INT},C_INT)
if jJumpto = -1 then
puts(1,"couldn't find ShellExecuteA\n")
abort(1)
end if
end if

procedure Exec_Prog(integer id,sequence filename,sequence defaultpath,sequence
parameters, integer flag)
sequence command, Filenam, DefaultPath, Parameters
atom command_ptr,Fnm_ptr,Prm_ptr,Dfp_ptr,hw
integer Nop
command = "Open"
Filenam= filename
Parameters=parameters
DefaultPath=defaultpath   
command_ptr = allocate_string(command)
Fnm_ptr = allocate_string(Filenam)
Prm_ptr = allocate_string(Parameters)
Dfp_ptr = allocate_string(DefaultPath)
hw= getHandle(id )
Nop=c_func(jJumpto,{hw,command_ptr,
Fnm_ptr,Prm_ptr,Dfp_ptr,flag})   
free(command_ptr)
free(Fnm_ptr)
free(Prm_ptr)
free(Dfp_ptr)
end procedure

Exec_Prog(
-- passing your main window's id
1,
-- with the program to call e.g: "IE.exe"
"exw",
-- this is the default path !! e.g: "C:\\Window\\IE\\"
"C:\\euphoria\\coolbmps\\",
-- the param to pass to exw.exe e.g "myhtm.html"
"coolwin2.exw",
-- and last, the 'show' parameter
SW_HIDE )

Notice I used SW_HIDE Chris, this will ensure no Console window will popup
when you run a program......

Later,

Euman
euman at bellsouth.net


> I was hoping I could make a library to handle basic dos commands.
> EG. mkdir,rmdir,chdir,delete, etc..
> I often have to use these commands, and system() doesn't cut it.
> If I call system() from exw.exe, windows insists it needs to restart in 
> full MS-DOS mode. I know, this is probably a specific problem with my 
> computer, but even still, system() forces a console window.
> 
> I know I can do what I want using the win API's, but that means I have 
> to make 2 libs, one for DOS, and one for WIN.
> 
> Chris
> 
> 
> euman at bellsouth.net wrote:
> > What are you trying to do Chris?  > "command"
> > 
> > Euman
> > euman at bellsouth.net
> > 
> > 
> > > How can I call interrupts using exw.exe?
> > > I can use dos_interrupt(), but I can't allocate low memory for buffers.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu