Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Attach to running QV process?

In my code I try to attach to a running instance of QlikView, but I always get an excpetion. I think I have the correct classname (CLSID) but apparently not so. I use QlikView 9 SR4 (64-bit). I have tried avery combination of running both Visual Studio and QlikView as administrator and normal user. The DirectCast will faile everytime.

I have tried several CLSID beside "QlikTech.QlikView" : QlikView.Document, QlikTech.QlikView.9, 86777794-415E-11D1-934D-0040333C91CC, 6E1BAAF6-ECB9-4505-86C1-5D04467B02CC.

Can anyone help me find the correct id? Or just know the solution.

Private Function GetQV() As QlikView.Application
Dim App As QlikView.Application = Nothing
Dim processes As Process() = Process.GetProcessesByName("Qv")
If processes.Length > 0 Then
Try
App = DirectCast(Marshal.GetActiveObject("QlikTech.Qlikview"), QlikView.Application)
Return App
Catch
End Try
End If
Return Nothing
End Function

Thanks

/Peter

0 Replies