weijia / pywinfuse

Automatically exported from code.google.com/p/pywinfuse
MIT License
1 stars 1 forks source link

writeFile LPDWORD should be LPVOID #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
when writing using mirror.py 
in tools.py in setDwordByPoint(valueAddress, value):
(dokan.LP_c_ulong) valueAddress cannot be incremented 

xp 32bits sp3 python 2.6.4
patch solved problem for me:
fuseBase.py
- WriteFileFuncType   = WINFUNCTYPE(c_int, LPCWSTR, LPCVOID, DWORD,
LPDWORD, LONGLONG, PDOKAN_FILE_INFO)
+ WriteFileFuncType   = WINFUNCTYPE(c_int, LPCWSTR, LPCVOID, DWORD, LPVOID,
LONGLONG, PDOKAN_FILE_INFO)

- ('WriteFile', WINFUNCTYPE(c_int, LPCWSTR, LPCVOID, DWORD, LPDWORD,
LONGLONG, PDOKAN_FILE_INFO)),
+ ('WriteFile', WINFUNCTYPE(c_int, LPCWSTR, LPCVOID, DWORD, LPVOID,
LONGLONG, PDOKAN_FILE_INFO)),

ps: great job
 - indenting 4 spaces would be nice.
 http://www.python.org/dev/peps/pep-0008/
 - i can help to implement raw_fi handle style so fuse-expose in
http://code.google.com/p/pyfilesystem/ could be pywinfuse-friendly.

Original issue reported on code.google.com by pmpp....@gmail.com on 26 Jan 2010 at 4:25

GoogleCodeExporter commented 9 years ago
the second change is in dokan.py

but anyhow, i can't create a new file on the mirror-drive-letter.. 
any hints on this? 

Original comment by ingob...@googlemail.com on 27 Jan 2010 at 4:32

GoogleCodeExporter commented 9 years ago
actually i can :
 - copy from somewhere toward the mirror fs
 - delete directory/file

i cannot (yet) :
  - rename 
  - overwrite existing file : must remove first, then copy again
  - drag/drop to make a "copy of" file with explorer in a mirror folder

i can't provide patches atm because i reworked pywinfuse code for my 
needs/coding
style and pyfs integration that imho provides a better interface for creating
advanced filesystems than python-fuse
anyway, as soon as i have a working bundle i will offer it here so hold the 
line :)

Original comment by pmpp....@gmail.com on 28 Jan 2010 at 2:19

GoogleCodeExporter commented 9 years ago
hi again,

pywinfuse-read-only$ patch -p1 < pywinfuse-0.1.1-dokan-pmpp.patch 

known caveheats:
 - sending to recycle bin send an error message and trash the file for sure.
 - noaccess file like hiberfil.sys,pagefile.sys are trying to be opened but they
shouldn't.
everything else seems ok and works enough for me ( pure vfs with no bin and no
protected files ) so i will not go further if this project is asleep.

attention , test file mirror C: by default to H:\

Original comment by pmpp....@gmail.com on 29 Jan 2010 at 5:53

Attachments:

GoogleCodeExporter commented 9 years ago
Hello, thanks for being interested to this project. And sorry for the late 
response. 
I've added you as committer and if you are willing to contribute, that'll be 
great. 
I'll try to update the script later. Thanks again.

Original comment by wang.wei...@gmail.com on 8 May 2010 at 3:09

GoogleCodeExporter commented 9 years ago
Updated WriteFile codes. As I'm not familiar with patch system, I was not able 
to apply the patch. I'll apply the changes in the future. Thanks.

Original comment by wang.wei...@gmail.com on 15 Jul 2011 at 3:28