Manager.GetDevices (DirectX?) lazarus / 34-Windows ---------------------------------------------------------------------- fatmonk · 2016-09-06 11:43 I want to use Manager.GetDevices to get a list of pointing devices (mice, trackpads etc) on a Windows machine. I've looked at MSDN (https://msdn.microsoft.com/en- us/library/windows/desktop/bb153253(v=vs.85).aspx) but I can't figure out how to instantiate an instance of Manager to get at the GetDevices function. I'm guessing that this will just be my first stumbling block, especially as once I have that list I want to be able to disable and enable these devices... but just getting access to that Manager[/tt/ object would be a good start - if, indeed, that is the best way to get access to these devices from Lazarus/FPC. Thanks, FM ---------------------------------------------------------------------- BlueIcaro · 2016-09-06 12:16 Hi, acording to microsoft https://msdn.microsoft.com/en- us/library/windows/desktop/ms835107.aspx This function is part of DirectX implementation. So you need include in your program DirectX headers. Here is some information about DirectX and freepascal/lazarus http://wiki.freepascal.org/FPC_and_DirectX /blueIcaro ---------------------------------------------------------------------- fatmonk · 2016-09-06 13:42 I spotted that reference and wondered if that was the case... I've included the files that seem relevant (DirectInput.pas, DirectX.inc, DXTypes.pas, Jedi.inc, Xinput.pas - some of which may not actually be needed, I'll play with dependencies if/once I get things working), but I guess I still need to create the Manager object and I can't figure that out... (Or does anyone know of a way of getting this info without DirectX?) -FM ---------------------------------------------------------------------- fatmonk · 2016-09-07 16:12 It looks like those fpc DirectX libraries don't contain the same functions and things that the MSDN example I linked to requires. So I've hit a complete dead end right now. Is there any other way to do this? -FM ---------------------------------------------------------------------- fatmonk · 2016-09-07 16:46 I'm getting somewhere now without using DirectX.. I'll start another thread that is more relevant. -FM