powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / PowerBuilder [игнор отключен] [закрыт для гостей] / GetSaveFileNameA... У кого есть опыт?
24 сообщений из 24, страница 1 из 1
GetSaveFileNameA... У кого есть опыт?
    #33045154
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Зделал функцию, структуру.
Зову функцию из окна, выпрыгивает виндовский диалог, если сохранять файлы в пассуемой a_s_file_dir, всё в порядке, если начинаю двигатса по директориям и создавать новые фолдэры, фолдэры создаютса... только аппликация рушитса.
Гляньте плиз, может кто чего (что не так увидит)

Спасибо.

Function long GetSaveFileNameA(REF OPENFILENAME SaveFileName) library "comdlg32.dll"


$PBExportHeader$f_get_file_save_name.srf
global type f_get_file_save_name from function_object
end type

forward prototypes
global function long f_get_file_save_name (window a_w_caller, string a_s_def_file_name, string a_s_file_type, string a_s_file_dir, string a_s_popup_title, ref string ar_s_full_name, ref string ar_s_short_name)
end prototypes

global function long f_get_file_save_name (window a_w_caller, string a_s_def_file_name, string a_s_file_type, string a_s_file_dir, string a_s_popup_title, ref string ar_s_full_name, ref string ar_s_short_name);/* a_s_file_type example: 'Text Files(*.txt), *.TXT,All Files (*.*)", "*.*",' */
/* a_s_file_dir example: 'c:\NewFolder' */

blob{1000} bl_filter
openfilename st_open

ULong OFN_EXPLORER, OFN_HIDEREADONLY, OFN_OVERWRITEPROMPT, l_result
char c_filter[1000]
long l_idx, l_str_size
int i_rc
string s[]

i_rc = 0

OFN_EXPLORER = (16^4) * 8 /* 0x00080000 */
OFN_HIDEREADONLY = 4 /* 0x00000004 */
OFN_OVERWRITEPROMPT = 1 /* 0x00000002 */

st_open.lstructsize = 76
st_open.hInstance = 0
st_open.lpstrcustomfilter = 0
st_open.nmaxcustomfilter = 0
st_open.nfilterindex = 0
st_open.nmaxfile = 500
st_open.lpstrfile = Space(500)
st_open.lpstrfiletitle = Space(500)
st_open.nmaxfiletitle = 500
st_open.nfileoffset = 0
st_open.nfileextension = 0
st_open.lpstrdefext = 0
st_open.lcustdata = 0
st_open.lpfnhook = 0
st_open.lptemplatename = 0
st_open.flags = OFN_EXPLORER + OFN_HIDEREADONLY + OFN_OVERWRITEPROMPT

bl_filter = Blob(a_s_file_type)

c_filter = a_s_file_type

FOR l_idx = 1 TO len(a_s_file_type)
IF string(c_filter[l_Idx]) = ',' THEN
l_result = BlobEdit(bl_filter, l_idx, Char(0))
END IF
NEXT

st_open.hwndowner = Handle(a_w_caller)
st_open.lpstrfile = a_s_def_file_name
st_open.lpstrfilter = bl_filter
st_open.lpstrinitialdir = a_s_file_dir
st_open.lpstrtitle = a_s_popup_title

i_rc = GetSaveFileNameA(st_open)

ar_s_full_name = st_open.lpstrfile
ar_s_short_name = st_open.lpstrfiletitle

RETURN i_rc

end function


$PBExportHeader$openfilename.srs
global type openfilename from structure
long lstructsize
long hwndowner
long hinstance
blob lpstrfilter
long lpstrcustomfilter
long nmaxcustomfilter
long nfilterindex
string lpstrfile
long nmaxfile
string lpstrfiletitle
long nmaxfiletitle
string lpstrinitialdir
string lpstrtitle
long flags
integer nfileoffset
integer nfileextension
long lpstrdefext
long lcustdata
long lpfnhook
long lptemplatename
end type





Туды её в качель...
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33045224
Фотография Филипп
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Поскольку версия РВ не указано, ещё более уверенно спрошу, а зачем всё это?
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33045235
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
version 9.0.2 Build 7610.

народ просит виндовский диалог, говорят эстетичней и удобнее чем билдэровский GetFileSaveName()

Туды её в качель...
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33045261
Фотография Филипп
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Ну для начала, и та и другая картинка - виндовский диалог, а НЕ билдэровский .
Поиск в этом форуме рулит.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33045583
Геннадич
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
RTFMThe dialog boxes presented by GetFileOpenName and GetFileSaveName are system dialog boxes. They provide standard system behavior, including control over the current directory. When users change the drive, directory, or folder in the dialog box, they change the current directory or folder. The newly selected directory or folder becomes the default for file operations until they exit the application, unless the optional initdir argument is passed.
The aFlag argument is used to pass one or more options that determine the appearance of the dialog box. For each option, the value of the flag is 2^(index -1), where index is an integer associated with each option as shown in the following table.You can pass multiple options by passing an aggregate flag, calculated by adding the values of the individual flags.

If you do not pass an aFlag, the Explorer-style open file dialog box is used. If you do pass a flag, the old-style dialog box is used by default. Some options do not apply when the Explorer-style dialog box is used. For those that do apply, add the option value for using the Explorer-style dialog box (2) to the value of the option if you want to display an Explorer-style dialog box.
For example, passing the flag 32768 (2^15) to the GetFileSaveName function opens the old-style dialog box with the Read Only check box selected by default. Passing the flag 32770 opens the Explorer-style dialog box with the Read Only check box selected by default.

Index Constant name Description
1 OFN_CREATEPROMPT If the specified file does not exist, prompt for permission to create the file. If the user chooses to create the file, the dialog box closes; otherwise the dialog box remains open.
2 OFN_EXPLORER Use an Explorer-style dialog box.
3 OFN_EXTENSIONDIFFERENT The file extension entered differed from the extensions specified in extension.
4 OFN_FILEMUSTEXIST Only the names of existing files can be entered.
5 OFN_HIDEREADONLY Hide the Read Only check box.
6 OFN_LONGNAMES Use long file names. Ignored for Explorer-style dialog boxes.
7 OFN_NOCHANGEDIR Restore the current directory to its original value if the user changed the directory while searching for files. This option has no effect for GetOpenFileName on Windows NT, 2000, and XP.
8 OFN_NODEREFERENCELINKS Return the path and file name of the selected shortcut (.lnk file); otherwise the path and file name pointed to by the shortcut are returned.
9 OFN_NOLONGNAMES Use short file names (8.3 format). Ignored for Explorer-style dialog boxes.
10 OFN_NONETWORKBUTTON Hide the Network button. Ignored for Explorer-style dialog boxes.
11 OFN_NOREADONLYRETURN The file returned is not read only and is not in a write-protected directory.
12 OFN_NOTESTFILECREATE Do not create the file before the dialog box is closed. This option should be specified if the application saves the file on a netwrok share where files can be created but not modified. No check is made for write protection, a full disk, an open drive door, or network protection. A file cannot be reopened once it is closed.
13 OFN_NOVALIDATE Invalid characters are allowed in file names.
14 OFN_OVERWRITEPROMPT Used in Save As dialog boxes. Generates a message box if the selected file already exists.
15 OFN_PATHMUSTEXIST Only valid paths and file names can be entered.
16 OFN_READONLY Select the Read Only check box when the Save dialog box is created.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046492
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Для начала и для конца: спасибо Филипп за квалифицированный ответ "по делу".
Обожаю когда вместо ответа по делу цепляютса к словам или пытаютса доказать что "так делать нельзя".

Зять тёще:
- Мама, хотите рыбки?
- Да.

- Так встаньте и возьмите.
- У меня ноги не ходят.

- Ну так сидите и не звездите.

ФилиппНу для начала, и та и другая картинка - виндовский диалог, а НЕ билдэровский .
Поиск в этом форуме рулит.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046505
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Геннадич, я как бы прочитал но не нашёл (пока), почему у меня то аппликация рушитса?

Геннадич RTFMThe dialog boxes presented by GetFileOpenName and GetFileSaveName are system dialog boxes. They provide standard system behavior, including control over the current directory. When users change the drive, directory, or folder in the dialog box, they change the current directory or folder. The newly selected directory or folder becomes the default for file operations until they exit the application, unless the optional initdir argument is passed.
The aFlag argument is used to pass one or more options that determine the appearance of the dialog box. For each option, the value of the flag is 2^(index -1), where index is an integer associated with each option as shown in the following table.You can pass multiple options by passing an aggregate flag, calculated by adding the values of the individual flags.

If you do not pass an aFlag, the Explorer-style open file dialog box is used. If you do pass a flag, the old-style dialog box is used by default. Some options do not apply when the Explorer-style dialog box is used. For those that do apply, add the option value for using the Explorer-style dialog box (2) to the value of the option if you want to display an Explorer-style dialog box.
For example, passing the flag 32768 (2^15) to the GetFileSaveName function opens the old-style dialog box with the Read Only check box selected by default. Passing the flag 32770 opens the Explorer-style dialog box with the Read Only check box selected by default.

Index Constant name Description
1 OFN_CREATEPROMPT If the specified file does not exist, prompt for permission to create the file. If the user chooses to create the file, the dialog box closes; otherwise the dialog box remains open.
2 OFN_EXPLORER Use an Explorer-style dialog box.
3 OFN_EXTENSIONDIFFERENT The file extension entered differed from the extensions specified in extension.
4 OFN_FILEMUSTEXIST Only the names of existing files can be entered.
5 OFN_HIDEREADONLY Hide the Read Only check box.
6 OFN_LONGNAMES Use long file names. Ignored for Explorer-style dialog boxes.
7 OFN_NOCHANGEDIR Restore the current directory to its original value if the user changed the directory while searching for files. This option has no effect for GetOpenFileName on Windows NT, 2000, and XP.
8 OFN_NODEREFERENCELINKS Return the path and file name of the selected shortcut (.lnk file); otherwise the path and file name pointed to by the shortcut are returned.
9 OFN_NOLONGNAMES Use short file names (8.3 format). Ignored for Explorer-style dialog boxes.
10 OFN_NONETWORKBUTTON Hide the Network button. Ignored for Explorer-style dialog boxes.
11 OFN_NOREADONLYRETURN The file returned is not read only and is not in a write-protected directory.
12 OFN_NOTESTFILECREATE Do not create the file before the dialog box is closed. This option should be specified if the application saves the file on a netwrok share where files can be created but not modified. No check is made for write protection, a full disk, an open drive door, or network protection. A file cannot be reopened once it is closed.
13 OFN_NOVALIDATE Invalid characters are allowed in file names.
14 OFN_OVERWRITEPROMPT Used in Save As dialog boxes. Generates a message box if the selected file already exists.
15 OFN_PATHMUSTEXIST Only valid paths and file names can be entered.
16 OFN_READONLY Select the Read Only check box when the Save dialog box is created.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046666
alexis glinski
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
voronkГеннадич, я как бы прочитал но не нашёл (пока), почему у меня то аппликация рушитса?
ну так почитай Help ...
PowerBuilder 9 Help: GetFileSaveName PowerScript function
For usage notes on the filter , initdir , and aFlag arguments, see the GetFileOpenName function.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046674
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
О,о,о,о,о,....
Дробь атаке, война окончена всем спасибо.
Извините те кому заморочил голову, дело в том, что в прошлый четверг я/мы переехали с 7 билдэра на 9. А кашу я заварил в 7. Геннадичу спасибо, я глянул в хэлп 9му на GetFileSaveName/GetFileSaveOpen, добавлена initdir (optional) и aFlag (optional). Только я ещё не разобрался, что нужно пасс к aFlag что бы он открыл нужный мне диалог, пока получаетса или "old style" или тот что открываетса бай дефолт и без aFlag.

Туды её в качель...
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046680
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Спасибо Саша, только что посмотрел, есть контакт.

alexis glinski voronkГеннадич, я как бы прочитал но не нашёл (пока), почему у меня то аппликация рушитса?
ну так почитай Help ...
PowerBuilder 9 Help: GetFileSaveName PowerScript function
For usage notes on the filter , initdir , and aFlag arguments, see the GetFileOpenName function.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046733
Фотография savosin_sergey
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2 voronok:
первое -- всё равно этот "расширенный" диалог выбора файла не будет работать на win9x/me и на winnt4.0
второе -- откуда такой рамер структуры:
Код: plaintext
st_open.lstructsize =  76 
третье -- очень плохо полагаться на константы (тот же размер структуры), так как выйдет какая-нибудь другая версия windows'а -- и всё свалится..
автортолько аппликация рушитса.
Подозреваю, что дело в неправильном размере структуры st_open. Я когда пытался открыть файло (а именно, пытался пересобрать MFC на хялявном компиляторе borland'а) тоже споткнулся на диалоге открытия файла (кот. похож на GetSaveFileName()). Смотри:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
typedef struct tagOFN { 
  DWORD         lStructSize; 
  HWND          hwndOwner; 
  HINSTANCE     hInstance; 
  LPCTSTR       lpstrFilter; 
  LPTSTR        lpstrCustomFilter; 
  DWORD         nMaxCustFilter; 
  DWORD         nFilterIndex; 
  LPTSTR        lpstrFile; 
  DWORD         nMaxFile; 
  LPTSTR        lpstrFileTitle; 
  DWORD         nMaxFileTitle; 
  LPCTSTR       lpstrInitialDir; 
  LPCTSTR       lpstrTitle; 
  DWORD         Flags; 
  WORD          nFileOffset; 
  WORD          nFileExtension; 
  LPCTSTR       lpstrDefExt; 
  LPARAM        lCustData; 
  LPOFNHOOKPROC lpfnHook; 
  LPCTSTR       lpTemplateName; 
#if (_WIN32_WINNT >= 0x0500)
  void *        pvReserved;
  DWORD         dwReserved;
  DWORD         FlagsEx;
#endif // (_WIN32_WINNT >= 0x0500)
} OPENFILENAME, *LPOPENFILENAME; 
-- это написано в MSDN. а в реальном заголовочном файле структура была описана не так! То есть, размер структуры зависит от версии windows (winnt 5 -- это и есть 2000-ник) и от того, как она описана..

Повторюсь: откуда такой размер структуры -- 76? в 2000-ке он, вроде бы 80 с чем-то.. Кстати, перед употреблением, неплохо бы заполнить структуру нулями на всякий случай..

В догонку: почему у тябе константная строка ( LPCTSTR lpstrFilter; ) в PB объявлена как blob? Так должно быть?

может про оборачивание winapi-функций посмотреть здесь
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046821
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Сергей...
Код я нашёл на гуглях, "магический" размер структуры 76... , первоначально хотел динамически посчитать, а потом подписать, оказалось, любое другое значение, 75 или 77, не открывает диалог вообще.

Клиентура вся на w2k и ХР.

Блоб должен быт, потому как в перспективе я могу давать функции не только:
"Text Files(*.txt), *.TXT, All Files (*.*), *.*", но и
"PIF files, *.PIF, Batch files, *.BAT", или ещё чего.

Посредством:
bl_filter = Blob(a_s_file_type)

c_filter = a_s_file_type

FOR l_idx = 1 TO len(a_s_file_type)
IF string(c_filter[l_Idx]) = ',' THEN
l_result = BlobEdit(bl_filter, l_idx, Char(0))
END IF
NEXT

получаетса симпатичное "dddw".

С PFC не работаем, powertool.

Попробую заполнить структуру нулями, потому как "стероидная" версия GetFileSaveName() 9 билдэра, даже при наличие aFlag (optional), всё равно не открывает нужный диалог.



Туды её в качель...
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046886
Фотография savosin_sergey
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
мысль номер два:
как-то возились мы с функцией GetCurrentDirectoryA
Код: plaintext
FUNCTION long GetCurrentDirectoryA(  long nBufferLength, REF string LPCTSTR ) LIBRARY "KERNEL32.DLL"
во-первых, строка принимается как ref string , во-вторых, при попытке что-ньть прочитать из неё после вызова функции вываливает приложение.

Выход: перед вызовом функции заполнять передаваемую строку, например, пробелами (штук эдак 255). В какой момет у тебя происходит сваливание? попробую всё-таки для начала строку передать
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046898
Фотография savosin_sergey
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
мысль два с половиной!
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
function (..)
string ls_ovi[]
...
//открытие файла
FOR i= 1  TO  400  //чтобы не было проблемы передачи в api-фукцию строки
	ls_ovi[ 1 ]=ls_ovi[ 1 ]+" "
NEXT
gd=GetCurrentDirectoryA( 400 , ls_ovi[ 1 ])
...
хитрость такая: передавать не строку, а элемент массива строк! почему -- не знаю, не я делал. но работает (ещё)
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046903
Локшин Марк
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
savosin_sergeyтретье -- очень плохо полагаться на константы (тот же размер структуры), так как выйдет какая-нибудь другая версия windows'а -- и всё свалится..
Если выйдет какая-либо другая версия Windows, которая не понимает константы 76, то придется перекомпилировать все приложения, которые использовали данную функцию. Дополнительные поля то в структуре могут появляться, но обратная совместимость всегда поддерживается. Размер же структуры для приложения зависит от ее описания в коде - т.е. вещь статическая и никак от версии Windows не зависящая.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33046946
Фотография Филипп
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
voronk- Ну так сидите и не звездите.
Звездун, поиск в этом форуме рулит!!!
как вызвать модное окно выбора файлов? (а-ля офис ХР?)
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33047044
Локшин Марк
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
savosin_sergeyхитрость такая: передавать не строку, а элемент массива строк! почему -- не знаю, не я делал. но работает (ещё)
1. Должно работать и без массивов, просто обязано.
2. Почему нужно заполнять чем-нибудь - я думаю понятно.
3. В PowerBuilder'е есть такая функция space(...)
4. В WinApi есть такая константа
Код: plaintext
MAX_PATH      =  4095 ;
соответственно выглядеть должно где-то так
Код: plaintext
ls_ovi = space( 4095 )
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33047127
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Филлип, не серчай ежели обидел, в запарке был немного.

Ребята, большое всем спасибо.
Проблема решена (сейчас действительно отбой).
Всё работает безотказно.
Я чегось намудрил когда подписывал структуру (массив по русски?)

Вообшем поменял немного последовательность чего, куда, когда и скока, и вот:

bl_filter = Blob(a_s_file_type)

c_filter = a_s_file_type

FOR l_idx = 1 TO len(s_string)
IF string(c_filter[l_Idx]) = ',' THEN
l_result = BlobEdit(bl_filter, l_idx, Char(0))
END IF
NEXT

setnull(s_null)

st_open.lstructsize = 76
st_open.hwndowner = Handle(This)
st_open.hInstance = 0
st_open.lpstrfilter = bl_filter
st_open.lpstrcustomfilter = 0
st_open.nmaxcustomfilter = 0
st_open.nfilterindex = 1
st_open.lpstrfile = a_s_def_file_name + space(500)
st_open.nmaxfile = len(st_open.lpstrfile) + 1
st_open.lpstrfiletitle = s_null
st_open.nmaxfiletitle = 0
st_open.lpstrinitialdir = a_s_file_dir
st_open.lpstrtitle = a_s_popup_title
st_open.flags = OFN_EXPLORER
st_open.nfileoffset = 0
st_open.nfileextension = 0
st_open.lpstrdefext = 0
st_open.lcustdata = 0
st_open.lpfnhook = 0
st_open.lptemplatename = 0

i_rc = GetSaveFileNameA(st_open)

Спасибо всем ещё раз.


Туды её в качель...
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33047297
Геннадич
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Я одно не могу понять: зачем использовать API, когда есть в билдере родная функция GetSaveFileName, хелп по которой я привёл выше?
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33047656
Фотография savosin_sergey
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
voronkst_open.nmaxfile = len(st_open.lpstrfile) + 1
вот в этом всё и дело. пока я тоже не указал длину nmaxfile на 1 больше, чем число powerBuilder-ровская длина строки lpstrfile , то вылетало..
2 Геннадич: по приколу! изучение передачи структур в функции winapi
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33048000
Когда-то очень давно я скачивал объект под названием nvo_commdlg. В нем все эти функции из comdlg32 (GetOpenFileNameA, GetSaveFileNameA, PrintDlgA, ChooseFontA) присутствуют.
К сожалению, ссылка не сохранилась.

Кое-что на эту тему еще можно посмотреть в группе PowerObject на yahoo:

http://groups.yahoo.com/group/PowerObject/
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33048492
Фотография voronk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Геннадич..., дык не открывает она нужный диалог, верхний (см. картинку), или по крайней мере у меня не получаетса.
Открывает или нижний на той же картинке или вот этот:

ГеннадичЯ одно не могу понять: зачем использовать API, когда есть в билдере родная функция GetSaveFileName, хелп по которой я привёл выше?
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33048626
gerss
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
savosin_sergey voronkst_open.nmaxfile = len(st_open.lpstrfile) + 1
вот в этом всё и дело. пока я тоже не указал длину nmaxfile на 1 больше, чем число powerBuilder-ровская длина строки lpstrfile , то вылетало..
2 Геннадич: по приколу! изучение передачи структур в функции winapi

Все логично - доп. 1 байт требуется для #0 - в API строки в основном #0-terminated.
...
Рейтинг: 0 / 0
GetSaveFileNameA... У кого есть опыт?
    #33048807
alexis glinski
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
...
Рейтинг: 0 / 0
24 сообщений из 24, страница 1 из 1
Форумы / PowerBuilder [игнор отключен] [закрыт для гостей] / GetSaveFileNameA... У кого есть опыт?
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]