IliumVR / SimplerHidWrite

An updated version of SimpleHidWrite in C#/WinForms
MIT License
9 stars 9 forks source link

Unable to compile #1

Open hegyak opened 5 years ago

hegyak commented 5 years ago

Hello, @Robmaister

When I attempt to compile your latest commit on your Fork for SimplerHidWrite, I get: Error CS0246 The type or namespace name 'ValueCaps' could not be found (are you missing a using directive or an assembly reference?)

SimplerHidWrite\DetailsForm.cs 146 SimplerHidWrite\DetailsForm.cs 245

SimplerHidWrite\Wrappers\HidDevice.cs 23 SimplerHidWrite\Wrappers\HidDevice.cs 241 SimplerHidWrite\Wrappers\HidDevice.cs 249 SimplerHidWrite\Wrappers\HidDevice.cs 257

I think those are references to IliumVR.Bindings. Are these ValueCaps, necessary? Is there anyway to get this to compile?

I am using Visual Studio 2019 on Windows 10 1809.

Robmaister commented 5 years ago

It's certainly possible to get it to compile, you'll just have to build the bindings and set up a reference to them yourself. They're nowhere near as complete as existing packages so I'd rather not put them up on Nuget. https://github.com/IliumVR/ToolsBindings

For context, I was in the process of converting from our internal WinApi bindings to an existing open-source project, but realized that some APIs from our bindings were missing. Never got around to fully converting it over or contributing those APIs so my fork is in a half-broken state.

quanfeining commented 4 years ago

Hello@Robmaister

When I attempt to run your latest commit on your Fork for SimplerHidWrite,I get this mistake:

if (!Kernel32.File.ReadAsync(reference, gch.AddrOfPinnedObject(), inBuffer.Length, ref bytesRead, fileOverlapped)) { if (Marshal.GetLastWin32Error() != 997)// ERROR_IO_PENDING throw new Win32Exception();

                    if (!fileEvent.WaitOne(timeout))
                    {
                        Kernel32.File.CancelIo(reference);
                        //fileEvent.Reset();
                        gch.Free();
                        return false;
                    }
   }

Kernel32.File.ReadAsync(reference, gch.AddrOfPinnedObject(), inBuffer.Length, ref bytesRead, fileOverlapped) this line wiil get error, "Win32Exception() 0x80004005" ,is deny access.

this is :IliumVR.Bindings.Win32.Hid/HidDevice.cs

I am using Visual Studio 2017 on Windows 10 1903.

Stefan-Gurtovoy commented 12 months ago

Did anyone manage to compile it?

Pryside commented 11 months ago

Did anyone manage to compile it?

Hi, its a bit tricky to compile since the necessary dlls are missing in this project. Here is how to get them: First download this project: https://github.com/IliumVR/ToolsBindings open the .sln and in the Solution-Explorer window in VisualStudio right click on every Ilium.xxx thing and build it. Then you should have all the necessary .dll files in the bin folders of that project. You can now close it and open the SimplerHidWrite .sln project and I started by removing the missing references in the Solution-explorer, then right click on references , add references and dig down in all the bin folders of the ToolBindings project and add all DLLs. Some will be duplicates you only need one of each and hit ok. Then building should be possible.

LarryMoe11 commented 8 months ago

Did anyone manage to compile it?

Hi, its a bit tricky to compile since the necessary dlls are missing in this project. Here is how to get them: First download this project: https://github.com/IliumVR/ToolsBindings open the .sln and in the Solution-Explorer window in VisualStudio right click on every Ilium.xxx thing and build it. Then you should have all the necessary .dll files in the bin folders of that project. You can now close it and open the SimplerHidWrite .sln project and I started by removing the missing references in the Solution-explorer, then right click on references , add references and dig down in all the bin folders of the ToolBindings project and add all DLLs. Some will be duplicates you only need one of each and hit ok. Then building should be possible.

After it is compiled using this method, I keep getting errors saying "Access is denied"