NO

Author Topic: LZCreateFileW  (Read 5711 times)

czerny

  • Guest
LZCreateFileW
« on: October 16, 2014, 12:31:55 AM »
I have found in the export table of Kernel32 the function LZCreateFileW.

This is not documented. It is obviously a companion function to the LZxxx functions for file compression.

I have found the following declaration:

Code: [Select]
ULONG WINAPI LZCreateFileW (IN LPCWSTR FileName,
IN DWORD dwDesiredAccess,
IN DWORD dwShareMode,
IN DWORD dwCreationDisposition,
IN LPWSTR lpString1 );

this is similar to CreateFile(). But I can not guess what lpString1 does.

Any ideas?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: LZCreateFileW
« Reply #1 on: October 16, 2014, 01:45:46 PM »
this is similar to CreateFile(). But I can not guess what lpString1 does.

Any ideas?

The name of the file?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: LZCreateFileW
« Reply #2 on: October 16, 2014, 04:21:08 PM »
Just copy filename to buffer even read first 14 bytes from file compressed with option -R
May the source be with you

czerny

  • Guest
Re: LZCreateFileW
« Reply #3 on: October 16, 2014, 11:46:36 PM »
this is similar to CreateFile(). But I can not guess what lpString1 does.

Any ideas?

The name of the file?
That is the first parameter.

czerny

  • Guest
Re: LZCreateFileW
« Reply #4 on: October 16, 2014, 11:47:23 PM »
Just copy filename to buffer even read first 14 bytes from file compressed with option -R
I don't understand.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: LZCreateFileW
« Reply #5 on: October 17, 2014, 08:44:11 AM »
Just copy filename to buffer even read first 14 bytes from file compressed with option -R
I don't understand.
That function just copy 1. parameter as filename to 4. parameter as string buffer.
Test file was packed with compress.exe option -R so there was information of last char for filename 'l'
lz32.dl_ -> lz32.dll

Some info here
May the source be with you

czerny

  • Guest
Re: LZCreateFileW
« Reply #6 on: October 17, 2014, 11:01:40 AM »
Just copy filename to buffer even read first 14 bytes from file compressed with option -R
I don't understand.
That function just copy 1. parameter as filename to 4. parameter as string buffer.
Test file was packed with compress.exe option -R so there was information of last char for filename 'l'
lz32.dl_ -> lz32.dll

Some info here
Thank you! That's it.