Re: [python-win32] How to set value with PyIPropertyStore

2019-11-15 Thread Peng Chen
Ok, I see, thanks a lot for your help though. I probably need to find a different method. Thanks a lot for your patience! On Fri, Nov 15, 2019 at 6:51 AM Tim Roberts wrote: > On Nov 14, 2019, at 4:15 PM, Peng Chen wrote: > > > > Nah, thanks, the stuff I'm trying to do is a

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-14 Thread Peng Chen
I thought of pywin32 and really didn't expect this coming... Thanks! On Mon, Nov 11, 2019 at 5:24 AM Tim Roberts wrote: > On Nov 10, 2019, at 4:13 PM, Peng Chen wrote: > > > then I tried > riid = "" > ctx = None > properties = propsy

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-10 Thread Peng Chen
t reported: (-2147221005, 'Invalid Class String', None, None) sorry for the different issues, possible to take a look on this? Thanks! On Fri, Nov 8, 2019 at 5:22 AM Tim Roberts wrote: > On Nov 7, 2019, at 2:33 PM, Peng Chen wrote: > > > I tried: > dateShifted = pro

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-07 Thread Peng Chen
win32comext.propsys import propsys, pscon On Thu, Nov 7, 2019 at 7:26 PM Tim Roberts wrote: > Peng Chen wrote: > > Hi Tim, > > Thanks for the reply. Sorry for the late. I just found your email > > today. Yes I tried with this code: > > > > from win32comext

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-06 Thread Peng Chen
) it reports: Object must be a PyPROPVARIANT On Tue, Oct 15, 2019 at 1:25 AM Tim Roberts wrote: > Peng Chen wrote: > > > > I'm working on a script to shift video media creation time. > > > > I can see there is a function > > PyIPropertyStore.SetValue(k

[python-win32] How to set value with PyIPropertyStore

2019-10-14 Thread Peng Chen
Hi, I'm working on a script to shift video media creation time. I used: properties = propsys.SHGetPropertyStoreFromParsingName(file_name) mDate = properties.GetValue(pscon.PKEY_Media_DateEncoded).GetValue() and successfully retrieved media encoded date property. Now I could shift the time and write

Re: [python-win32] 8G USB sector number

2012-08-09 Thread Jane Chen
My bad. I should use 'Q' instead of 'LL'. Thank you Tim! Jane Jane Chen wrote: > Hi all, > I would like to get total sector number of my disk. However, I found that I > cannot get 8G sectors because of the buffer size. >  I only g

[python-win32] 8G USB sector number

2012-08-08 Thread Jane Chen
Hi all, I would like to get total sector number of my disk. However, I found that I cannot get 8G sectors because of the buffer size. I only got 4G. buf_fmt='LL' buf_size=struct.calcsize(buf_fmt) buf=win32file.DeviceIoControl(h, winioctlcon.IOCTL_DISK_GET_LENGTH_INFO, None, buf_size, None) Cou

Re: [python-win32] creating disk image

2012-08-08 Thread Jane Chen
Cool. Thank you Tim! Jane Chen wrote: > Thank you for your help, Roger and Tim! > > Problem solved.  I realized that I can simplify my problem by > using win32file.ReadFile()to create a bin file. You don't even need to go that far.  There's nothing you can do with win32

Re: [python-win32] creating disk image

2012-08-06 Thread Jane Chen
Thank you for your help, Roger and Tim!  Problem solved.  I realized that I can simplify my problem by using win32file.ReadFile()to create a bin file. Thank you, Jane  --- There's a FileStream class in \win32com\server\util.py that creates an IStream connected to a

[python-win32] creating disk image

2012-08-02 Thread Jane Chen
Hi all, I would like to create disk image through SHCreateStreamOnFileEx,IStream::Read, and IStream::Write. However, I cannot find these API in python-win32. I am wondering how to create disk image through python. Thank you, Jane___ python-win32 maili

Re: [python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-26 Thread Jane Chen
SD card? Thank you, Jane Jane Chen wrote: > Thank you for your help! No luck so far. > > I wrote a C program and got the same results as python: Support for this ioctl is sporadic.  It may simply be that your SD drive doesn't support it. > Win 7 Notebook (with SD card inserted

Re: [python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-23 Thread Jane Chen
tf("Failed to get ProtocolGUID, err code: %d",dwErr);         }  else{  printf("%s \n", pCmdBuf->ProtocolGUID);  }    delete [] pCmdBuf;  return 0;   } Thank you, Jane Jane Chen wrote: > Sorry. It's a mistake. However, I still get the same error message. > Maybe t

Re: [python-win32] python-win32 Digest, Vol 112, Issue 19

2012-07-23 Thread Jane Chen
      }  else{  printf("%s \n", pCmdBuf->ProtocolGUID);  }    delete [] pCmdBuf;  return 0;   } Thank you, Jane Jane Chen wrote: > Sorry. It's a mistake. However, I still get the same error message. > Maybe there is another mistake. :( > Is there any tool for debugging

Re: [python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-18 Thread Jane Chen
Sorry. It's a mistake. However, I still get the same error message. Maybe there is another mistake. :( Is there any tool for debugging purpose?  Thank you, Jane >                    drive=".\\"+drive+'.' Why are you adding a dot?  That's a mistake.  You want  just ".\\E:" .  Remove the

Re: [python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-18 Thread Jane Chen
I want my script to tell if the removable disk is an SD card or not, so I wrote the following script. buf_fmt='HH'   buf_size=struct.calcsize(buf_fmt) drives = (drive for drive in win32api.GetLogicalDriveStrings ().split ("\\\000") if drive)         for drive in drives:             if win32

Re: [python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-18 Thread Jane Chen
Jane Chen wrote: > > Thank you for your help. However, I still got pywintypes.error: (50, > "DeviceIoControl", "The request is not supported"). > >  I added the following codes to winioctlcon.py <http://winioctlcon.py/>. You should not probably modify t

Re: [python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-17 Thread Jane Chen
Thank you for your help. However, I still got pywintypes.error: (50, "DeviceIoControl", "The request is not supported").   I added the following codes to winioctlcon.py. IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL = CTL_CODE( FILE_DEVICE_DISK, 0x7a0, METHOD_BUFFERED, FILE_ANY_ACCESS) GUID_SFF_PROTOCO

[python-win32] Does pywin32 support SD card operation (IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?

2012-07-16 Thread Jane Chen
Hi All, Does pywin32 support SD card operation (IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?   I google IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL with Python. However, no useful information shows up.  My code: if win32file.DeviceIoControl(hVol, winioctlcon.IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL, 0, 6, 0): Er

Re: [python-win32] ImportError: DLL load failed

2012-07-13 Thread Jane Chen
-packages\win32\ lib, and xx\python\lib\site-packages\Pythonwin.  Regards, Jane From: Mark Hammond To: Jane Chen Cc: "python-win32@python.org" Sent: Thursday, July 12, 2012 6:39 PM Subject: Re: [python-win32] ImportError: DLL load failed On 13/07/201

[python-win32] ImportError: DLL load failed

2012-07-12 Thread Jane Chen
Hi all, I would like to add python win32 to Portable Python distribution with PyGTK for Windows http://fnch.users.sourceforge.net/portablepygtkwindows.html  I installed the pywin32 in the python\Lib\site-packages folder. PC #1 can find win32api.pyd. After that, I copied the whole portable python

[python-win32] How to delete a dispatched object

2008-02-28 Thread Chen
Hi I am wondering how could I delete an dispatched object? Do I just delete the reference to that object? Does python garbage collector take care of everything after I delete the reference? Is there any method which I could use to delete a dispatched object? -- CHEN HUANG COMPUTER Engineering

[python-win32] Data Type Conversion in Python Win32 COM

2008-02-21 Thread Chen
. If yes, how python win32 COM does the conversion? Thanks Chen ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] parameters got changed after passing to a function through COM

2008-01-31 Thread Chen Huang
e problem lies in my part of python program or in the python win32com or in the third-party COM support. Thank you very much! Chen - This transmission (including any attachments) may contain confidential information,