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)
Example #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
Example #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))
Example #4
0
    def __call__(self, displayValue, type, message):
        if type=="": eg.PrintError("Message type must be set!")

        preset = "LLEVCallBackWnd#1" + type + " " + message
        
        try:
            hwnd = FindWindow(None, LOW_LEVEL_SENDKEYS_CLASS)
        except:
            self.plugin.TriggerEvent("ServerNotFound")
            raise self.Exceptions.ProgramNotRunning
            
        cds = COPYDATASTRUCT()
        cds.dwData = 1
        cds.lpData = cast(c_wchar_p(preset), PVOID)
        cds.cbData = (len(preset) + 1)*2
        return SendMessage(hwnd, WM_COPYDATA, 0, addressof(cds))        
        return res