Windows Tablet RealTimeStylus in Python

D

Damon

I have a Windows Tablet machine, running XP Tablet Edition, and I want
to access the stylus data from Python.

If anyone has done this themselves, I'd be very grateful for a
description of what worked.

Otherwise, I'd be grateful for advice. I'm in way over my head, so
what I describe below is probably full of errors.

I managed to access the stylus data successfully from C#, using a .net
object called RealTimeStylus, contained in Microsoft.Ink.dll, which
was located in
c:\program files\common files\microsoft shared\ink.

The documentation says that this .net object uses an underlying COM
object, so I hoped to be able to access the COM object from within
Python. First, I used a .net disassembler to inspect
Microsoft.Ink.dll, and I discovered that it uses this command to
create the COM object:
Guid clsid = new Guid("{DECBDC16-E824-436e-872D-14E8C7BF7D8B}");
Guid iid = new Guid("{C6C77F97-545E-4873-85F2-E0FEE550B2E9}");
string licenseKey = "{CAAD7274-4004-44e0-8A17-D6F1919C443A}";
ComObjectCreator.CreateInstanceLicense(clsid, iid, licenseKey);

I looked up this clsid in my registry, and discovered that it refers
to
C:\Program Files\Common Files\Microsoft Shared\INK\inkobj.dll
(This file also exists on my standard XP machine, which also ran my C#
program happily.)

Now, I want to somehow access this COM object from within Python. I
tried MakePy, but I didn't know what type library to specify. I found
something called "Microsoft Tablet PC Type Library, version 1.0
(1.0)", and it generated a .py file from type library 'inkobj.dll',
but this file doesn't say anything about a RealTimeStylus.

I tried looking for a Python command to CreateInstance, but I couldn't
find one where I could specify the license string. Without the license
string I ended up with the error message "Class is not licensed for
use".

I have no idea what to do next.

Damon.
 
M

Méta-MCI \(MVP\)

Hi!

I use Internet-Explorer like (as?) GUI.
Then, I insert Active-X components (from Tablet-PC, native or SDK).

Another solution: create a .HTA, and use PythonScript (version
"ActiveScripting" of Python, who become with pyWin32).

@-salutations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top