[HOW TO] Automate hid driver + CCV in background
Posted: 01 July 2010 03:07 AM   [ Ignore ]
Rank
Joined  2010-02-11
Total Posts:  50
New Member

Hi guys.

For few days I tried messing with the sources of both ccv and hid driver but had no luck. My goal was to get hid driver automated and ccv as well working in the background. I tried many methods and this seems to be working the best.

I got the idea from cktouch’s method so, some credit to you, which can be found here:

http://kaiouncharles.free.fr/touch/index.php?post/2009/07/30/HID-Driver-as-Windows-Service

If anyone wants the hiddriver, please refer here :

http://multitouchvista.codeplex.com/

and how to install it please refer here:

http://kaiouncharles.free.fr/touch/index.php?q=hid+driver

In the attachment there will be 3-5 files, which i will show how to use in the video below. I recorded in full screen so it can be seen better. Well I hope this helps people that are interested in automating the multitouch system, or even just wanting to run community core vision in the background, which seems to be saving some cpu if i am not mistaking. If anyone is interested in only doing that, just put the files in the right places and make a shortcut to ccv.exe. Again, this method isn’t 100% perfect, but it is a start and a quick fix until better version are released.

Edit:
I have updated ccv.exe where the path is not specified, so it no longer has to be in “c:\multitouch\”, it just has to be in the same folder as community core vision. You can make shortcut or open it manually and it will work; however, if you want to run it with task manager make sure you write the full path to the file in the “start in” field, as you can see me do in the video.

Please let me know if i missed anything.

http://www.vimeo.com/13000298

Here is the source for ccv.exe for anyone that is interested. It is just a simple program.

Add a Timer1 with 1000 interval enabled
Add a Timer2 with 10000 interval enabled

Public Class CCV
    
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As IntegerByVal nCmdShow As Integer) As Integer
    
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As StringByVal lpWindowName As String) As Integer
    
Private Const SW_HIDE 0
    
Public Sub KillProcess(ByVal processName As String)
        
On Error GoTo ErrHandler
        Dim oWMI
        Dim ret
        Dim sService
        Dim oWMIServices
        Dim oWMIService
        Dim oServices
        Dim oService
        Dim servicename
        oWMI 
GetObject("winmgmts:")
        
oServices oWMI.InstancesOf("win32_process")
        For 
Each oService In oServices
            servicename 
LCase(Trim(CStr(oService.Name) & ""))
            If 
InStr(1servicenameLCase(processName), vbTextCompare) > 0 Then
                ret 
oService.Terminate
            End 
If
        
Next
        oServices 
Nothing
        oWMI 
Nothing
ErrHandler
:
        
Err.Clear()
    
End Sub
    
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        Dim loadccv 
As New System.Diagnostics.ProcessStartInfo()
        
loadccv.FileName "Community Core Vision.exe" 'Loads community core vision
        loadccv.WindowStyle = ProcessWindowStyle.Hidden '
Hides the console of community core vision at start
        Process
.Start(loadccv)
    
End Sub

    
Private Sub Timer1_Tick(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Timer1.Tick
        Dim hnd 
As Integer
        hnd 
FindWindow("Glut"Nothing'Finds community core vision based on it'class name
        ShowWindow
(hndSW_HIDE)
    
End Sub
    
Private Sub Timer2_Tick(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Timer2.Tick
        KillProcess
("CCV.exe"''Kills ccv.exe from task processother methods would just not stop it for some reason.
    
End Sub
End 
Class

Thanks

File Attachments
Files.zip  (File Size: 18KB - Downloads: 408)
Profile
 
 
Posted: 01 July 2010 08:07 AM   [ Ignore ]   [ # 1 ]
Avatar
RankRankRankRankRankRank
Joined  2009-04-14
Total Posts:  1897
Dedicated

Hi,
What did you do to get such result ? I didn’t have time yet to finish my work on my background CCV.

Do you allow me to publish a post on my blog with your technic if this work ?

By the way, regarding the Driver, I will release the fixed version I made with automatic launch for the public as soon as I am done with my exams in about 10 days…

 Signature 

One more but very useful blog : http://blog.cktouch.com/
Rear DI + Windows Seven = So Nice…
_________________________________________________

Profile
 
 
Posted: 01 July 2010 08:20 AM   [ Ignore ]   [ # 2 ]
Avatar
RankRankRank
Joined  2009-11-09
Total Posts:  489
Sr. Member

very nice! i will try this on monday - with the instructions @ mashine’s blog it works but my calibration is a little offset...dunno why and i hope your method will fix it!

 Signature 

My DSI Project:

DSI Table
Proj.Surface: 7D006 on top
2x PS3 Camera from Peau with 850BF & 3.6mm lense
Endlightend XXL (10mm)with 850nm LED strip

Projector: SANYO DWL100 ~ 950€

PC:
Core i5, 8GB Ram, HD5850

Profile
 
 
Posted: 01 July 2010 10:23 AM   [ Ignore ]   [ # 3 ]
Avatar
RankRankRankRankRankRank
Joined  2009-04-14
Total Posts:  1897
Dedicated

and thanks for the thumb up, I much appreciate !
can you send me the sources of your ccv.exe and i’ll see how I can make an installer for this… for the automation of the driver as service, the fixed version works perfectly already…

 Signature 

One more but very useful blog : http://blog.cktouch.com/
Rear DI + Windows Seven = So Nice…
_________________________________________________

Profile
 
 
Posted: 01 July 2010 12:50 PM   [ Ignore ]   [ # 4 ]
RankRankRankRank
Joined  2007-07-14
Total Posts:  819
Elite

I would prefer you give http://multitouchvista.codeplex.com as a HID driver download link. Thank you.

 Signature 

HID Multitouch driver for Windows 7 http://multitouchvista.codeplex.com/

Profile
 
 
Posted: 01 July 2010 12:52 PM   [ Ignore ]   [ # 5 ]
Avatar
RankRankRankRankRankRank
Joined  2009-04-14
Total Posts:  1897
Dedicated

done for him

 Signature 

One more but very useful blog : http://blog.cktouch.com/
Rear DI + Windows Seven = So Nice…
_________________________________________________

Profile
 
 
Posted: 01 July 2010 01:11 PM   [ Ignore ]   [ # 6 ]
Rank
Joined  2010-02-11
Total Posts:  50
New Member
MashineGun - 01 July 2010 08:07 AM

Hi,
What did you do to get such result ? I didn’t have time yet to finish my work on my background CCV.

Do you allow me to publish a post on my blog with your technic if this work ?

By the way, regarding the Driver, I will release the fixed version I made with automatic launch for the public as soon as I am done with my exams in about 10 days…

Sure any one who would like to post this method elsewhere feel free to do so. I posted the ccv.exe code. It basically loads communnity core vision hidden then tries to hide the 2nd window of community core vision with timers.

Profile
 
 
Posted: 01 July 2010 05:45 PM   [ Ignore ]   [ # 7 ]
Avatar
RankRankRankRank
Joined  2006-11-09
Total Posts:  1495
Administrator

Great tutorial Art! thanks for your contribution I’m sure this will help many smile

 Signature 

~

Profile
 
 
Posted: 14 July 2010 03:23 PM   [ Ignore ]   [ # 8 ]
Rank
Joined  2009-06-14
Total Posts:  24
New Member

Thanks for the video art, it helped a lot and worked perfectly! =)

Profile
 
 
Posted: 20 November 2011 12:48 PM   [ Ignore ]   [ # 9 ]
Rank
Joined  2011-11-16
Total Posts:  6
New Member

First of all sorry for posting in such a old topic smile

First of all thank you for the piece of software.

Now some information.
I am using the code to launch ccv in background to build a useful tool, it still launches ccv in background. But instead of turning itself off it will go to the system tray.
If you open the program via the systray you have a few options, recapture background, make ccv visible again, hide it again, also there are controls for sending flash and tuio.
Main thing why i decided to make some changes was that i have the problem that when i start my display (using a unmodified tft panel over here) it seems to send out more ir light then when its warmed up.
So the application will recapture the background again after being on for 10 minutes.

If anybody has some more suggestions for functionality please write them down. I will finish the modifications asap and post the updated program in this topic smile

Profile