Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile #1

Open
hegyak opened this issue Apr 30, 2019 · 5 comments
Open

Unable to compile #1

hegyak opened this issue Apr 30, 2019 · 5 comments

Comments

@hegyak
Copy link

hegyak commented Apr 30, 2019

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
Copy link
Contributor

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
Copy link

quanfeining commented Dec 19, 2019

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
Copy link

Did anyone manage to compile it?

@Pryside
Copy link

Pryside commented Sep 14, 2023

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
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants