PDA

View Full Version : create directories at runtime


dev6ishl
12-13-2004, 06:58 AM
Hi,
I would like to know how to create directories in windows using forms6i
runtime.

thanks

Frank Piron
12-13-2004, 07:34 AM
Am 13 Dec 2004 06:58:43 -0800 schrieb dev6ishl <mhdsuhail@gmail.com>:
Hi, I would like to know how to create directories in windows using forms6i runtime.

Two alternatives:

1)
from your application write a cmd-batch which calls mkdir
and after that call the batch via host() builtin. (q&d)

2)
Bind win32 api function CreateDirectory() to your app
using FFI (foreign function interface). (IMO the better way)

Regards
--
Frank Piron,
defrankatkonaddot
(leftrotate two)

dev6ishl
12-13-2004, 08:04 AM
Thanks for the prompt response.
I would be really grateful if you could tell me a little more about the
second option.

Frank Piron
12-13-2004, 08:12 AM
Am 13 Dec 2004 08:04:30 -0800 schrieb dev6ishl <mhdsuhail@gmail.com>:
Thanks for the prompt response. I would be really grateful if you could tell me a little more about the second option.
IMO the easiest way to learn about FFI is to look into the
documentation and study the D2kwutil.pll (package specs and
bodies) from Oracle.

The FFI is a method to load shared libraries into the adress
space of forms runtime and call C routines e.g. win32-api
functions from forms runtime.

I once wrote a package "region" which uses win32 calls to
determine the selected region in a multiline edit field.

If you are interested i will mail you the code.
--
Frank Piron,
defrankatkonaddot
(leftrotate two)

dev6ishl
12-13-2004, 09:21 AM
Thanks I will try out as you mentioned and get back to you.

Frank Piron
12-14-2004, 12:53 AM
Am 13 Dec 2004 09:21:02 -0800 schrieb dev6ishl <mhdsuhail@gmail.com>:
Thanks I will try out as you mentioned and get back to you.
I looked once more (and now with both of my eyes) at
d2kwutil.pll from oracle and found the Create_Directory()
procedure in the package Win_Api_Utility.
So you don't need to import the win api routine for yourself.
But nevertheless understanding the FFI will give you much
more flexibility with dev6i on windows.
--
Frank Piron,
defrankatkonaddot
(leftrotate two)

dev6ishl
12-19-2004, 05:04 AM
Thanks for the same. When I checked I found out about the
create_drirectory() in d2kwutil.

I thought this must be the one you were tellinkg about.
But i would like to know how to manoeuver between directories and
create them if they dont exist.

Thanks
Suhail


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service