def SendCopydata(self, xmlMsg):
     if not self.apHwnd:
         return None
     cpyData = ctypes.create_string_buffer(xmlMsg)
     cds = COPYDATASTRUCT()
     cds.cbData = ctypes.sizeof(cpyData)
     cds.lpData = ctypes.cast(ctypes.pointer(cpyData), ctypes.c_void_p)
     return win32gui.SendMessage(self.apHwnd, WM_COPYDATA, self.mr.hwnd,
                                 cds)
예제 #2
0
    def __call__(self):
        try:
            hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None)
        except:
            raise self.Exceptions.ProgramNotRunning

        cds = COPYDATASTRUCT()
        cds.dwData = COPY_GET_PRESETLIST
        SendMessage(hwnd, WM_COPYDATA, eg.messageReceiver.hwnd, addressof(cds))
        return cds
예제 #3
0
    def __call__(self, preset):
        try:
            hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None)
        except:
            raise self.Exceptions.ProgramNotRunning

        cds = COPYDATASTRUCT()
        cds.dwData = COPY_SETACTIVEPRESET
        cds.lpData = cast(c_wchar_p(preset), PVOID)
        cds.cbData = (len(preset) + 1)*2
        return SendMessage(hwnd, WM_COPYDATA, eg.messageReceiver.hwnd, addressof(cds))