SelectDirectory fonksiyonunda "I/O error 123" hata

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
nuc
Üye
Mesajlar: 7
Kayıt: 20 Mar 2004 11:49

SelectDirectory fonksiyonunda "I/O error 123" hata

Mesaj gönderen nuc »

Delphi7 ile aşağıdaki kod örneğindeki gibi SelectDirectory fonksiyonu çağrıldığında "I/O error 123" hatası veriyor.

Kod: Tümünü seç

var Path: string;
begin
Path := '';
SelectDirectory(Path,[],0);
Ancak geliştirme yaptığım makinada hata almıyorum, sadece kurulum yapılan ayrı bir sistemde bu hatayı veriyor.
Kullanıcı avatarı
mege
Admin
Mesajlar: 2360
Kayıt: 05 Şub 2004 04:32
Konum: Beşiktaş
İletişim:

Mesaj gönderen mege »

sanırım kullanım hatan var.
SelectDirectory

unit Dialogs
category Dialog and Message routines

declaration
function SelectDirectory(const Caption; const Root : widestring; out Directory: string): boolean;

description
SelectDirectory function brings up a dialog box ready for the user to select a directory name.

SelectDirectory function is an encapsulation of the BrowseForFolder Windows API function.
The dialog box includes an "OK" and a "Cancel" button, if the user presses the "Cancel" button the function returns False. If the user presses the "OK" button the function returns the directory selected in a Directory parameter. When the dialog is displayed it uses the Root parameter as the directory from which to browse. Caption is the message of the dialog, not the caption, the dilaog caption is "Browse For Folder".

example

var dir : widestring;

if SelectDirectory('My message','d:\!gajba',dir) then
showmessage('Folder selected ' + dir);
kaynak
.-.-.-.-.-.-.-. ^_^
nuc
Üye
Mesajlar: 7
Kayıt: 20 Mar 2004 11:49

Mesaj gönderen nuc »

SelectDirectory fonksiyonunun diğer parametreler ile çağrılanını kullanıyorum. Aşağıdaki tanımda yer alan ikincisini.

SelectDirectory function decleration
Unit

FileCtrl

Category

dialog and message routines

Delphi syntax:

function SelectDirectory(const Caption: string; const Root: WideString; out Directory: string): Boolean; overload;
function SelectDirectory(var Directory: string; Options: TSelectDirOpts; HelpCtx: Longint): Boolean; overload;
Kullanıcı avatarı
mege
Admin
Mesajlar: 2360
Kayıt: 05 Şub 2004 04:32
Konum: Beşiktaş
İletişim:

Mesaj gönderen mege »

anladığıma göre 123 hatası olmayan dizine erişmeye çalışmakla ilgili verdiğin path değerinin defaultunu path:=null yerine path:= ExtractFilePath(Application.ExeName) dene.
.-.-.-.-.-.-.-. ^_^
Cevapla