ge9 / IddSampleDriver

Add virtual monitors to your windows 10 device! Works with Oculus software, obs, and any desktop sharing software
683 stars 50 forks source link

Question: installation path #19

Closed TheAsmitKid closed 8 months ago

TheAsmitKid commented 8 months ago

Hey.. I am a beginner taking about win32api via c++.. so I'm sorry if this is a stupid question..

I'm developing a little app for myself and I was wondering if it's alright if I unzip the release to somewhere else except C:\IddSampleDriver\ like `C:\MyProject\utils\'

(If i need to recompile it.. i can't install wdk or visual studio right now so can I make changes directly to the .inf file if required via notepad++ or vscode and then generate a catalog and certificate for it?)

another sorry if my english is bad...

ge9 commented 8 months ago

The string C:\IddSampleDriver\ is directly written in Driver.cpp, which is compiled into the main binary file of this driver (IddSampleDriver.dll). This means you need to recompile it with wdk and visual studio to change the path. Of course, the directory could essentially be anywhere. I fixed the string just because I wanted to simplify my work. Do you have any problem with the fixed C:\IddSampleDriver\?

TheAsmitKid commented 8 months ago

backstory: Actually I am working for a desktop utility project "Boweci" and I've been searching for a way to generate virtual displays, i really liked Microsoft's concept of indirect display and i found this repo upon searching for precompiled ones but when the user is installing my app, it would be inconvenient to have it install in different folder.. so I was wondering if I can just make it a part of my installer

Question: could you help me somehow? Like manufacturers' drivers does not have to be installed that way, or have the option.txt in C:\Windows\System32\

Request: And if compilation doesn't take a long period of time.. could you please compile it for me for path C:\Boweci\ i know i shouldn't ask u but it'd make things easier for me if u could ^__^

Nevertheless.. thank you for making this project, it's been a knowledgeable journey for me (⁠ ⁠╹⁠▽⁠╹⁠ ⁠)

ge9 commented 8 months ago

OK, I'll work on adding some mechanism for changing installation directory.

TheAsmitKid commented 8 months ago

Thank you so much! After that i could easily integrate it with my app, I think i might complete it near my 11 November goal! Really thankyou♡

TheAsmitKid commented 8 months ago

Shall I close the issue?

ge9 commented 8 months ago

I think I'll add an environment variable to override the default location. Then I close this issue.

TheAsmitKid commented 8 months ago

Okay

ge9 commented 8 months ago

https://github.com/ge9/IddSampleDriver/releases/tag/0.0.1.4 I added the release. Does this work for you?

TheAsmitKid commented 8 months ago

Looks good, i just gave my exam so I'll check later Also, one question Can I use devcon to restart the driver instead of rebooting?

TheAsmitKid commented 8 months ago

does not work, i even restarted my pc, it still didn't work, so i reinstalled the prev version and that works just like it did, this new one just does not work, i have tried setting IDD_SAMPLE_DRIVER_CONFIG to C:\Boweci\ (installation path) and C:\Boweci\option.txt image

TheAsmitKid commented 8 months ago

i then reinstalled the new one in the dir shown in pic, doesnt work

ge9 commented 8 months ago

IDD_SAMPLE_DRIVER_CONFIG should be file path to the config file, C:\Boweci\option.txt in your case.

ge9 commented 8 months ago

In my testing, the system that manages device drivers seems to load environment variables only when Windows starts. So normal driver reloading won't work (though there might be some way that I'm not aware of).

TheAsmitKid commented 8 months ago

_IDD_SAMPLE_DRIVERCONFIG should be file path to the config file, C:\Boweci\option.txt in your case. image still a no

In my testing, the system that manages device drivers seems to load environment variables only when Windows starts. So normal driver reloading won't work (though there might be some way that I'm not aware of). not working even after a restart

TheAsmitKid commented 8 months ago

APPARENTLY i deleted C:\Windows\System32\Drivers\UMDF\iddsampledriver.dll and copied the one in the installation folder then restarted, and it works now

Now do I have to do it every time? I mean it's 2 more steps and it'd take just one line in my code to copy it.. but is it necessary? playing with system files in someone's else's computer...

TheAsmitKid commented 8 months ago

Ohkay it might be because the driver was not installed properly I reedited the folder name and restarted the driver then it showed the same error But I edited the env var end restarted the driver didn't work(expected) Restarted my pc and it works So sorry to bother you And thank you very much!

TheAsmitKid commented 8 months ago

can u give me access to the repo? i have a couple ideas in mind for improvement

TheAsmitKid commented 8 months ago

Also ca