plOpenFile

The plOpenFile function opens a Pe File.
plOpenFile( DWORD plStyle, // Open style
LPTSTR plFileNameBuffer // Address of buffer for text );
Parameters
plStyle
Specifies the style of the openning.There are to styles:
Style Meaning
PL_USE_OPEN_DIALOG When this is selected, the library will
create an open dialog with filter string "*.*".
PL_NO_OPEN_DIALOG If you use this there won't be an open
dialog.
plFileNameBuffer
Containts the address of a buffer with the filename string or the address, where the filename string will be put.If you use PL_USE_OPEN_DIALOG the library will fill the memory pointed by this address with the filename string.If you use PL_NO_OPEN_DIALOG the address *must* point to a filename string, which will be used as file to open.Take a look at the example.
Remarks
Once a file is opened every modification you make will be written directly to the file on disk.So be aware what you are doing.
Return Value
If the function succeeds, the return value is TRUE.
Examples
| PL_USE_OPEN_DIALOG |
|---|
.data? StrFileName db 512 dup(?) .code invoke plOpenFile,PL_USE_OPEN_DIALOG,addr strFileName |
| PL_NO_OPEN_DIALOG |
|---|
.data StrFileName db "C:\My Documents\Pe File.exe",0 .code invoke plOpenFile,PL_NO_OPEN_DIALOG,addr strFileName |
See Also
plCloseFile, plSaveToNewFile, plSetFileSize

Pumqara <programs@mail.bg> 2004. All rights reserved.