Hello everybody,


I wrote a vxd for my app to use and all works fine. Problem arises when I set my app to start automatically when the system starts. In this case vxd does not run. (Error file not found) If I restart my app from the task bar all is good. I googled around and found vxd's must live in windows\system directory. If I move my vxd out of local directory to Windows\System directory all is good.

I need my vxd to be dynamic and I use create file to load it with path set \\.\myvxd.vxd.

Three questions:
1) I don't want to install my vxd in windows\system, is there another way?
2) Why can't I use an absolute path instead of \\.\?
3) What exactly does \\.\ mean, like what is it equivalent to?

Any suggestions appreciated.

best regards,

czDrillard
Posted on 2002-08-29 12:55:54 by czDrillard
Hi,

You should just take a good look at Izcelion's vxd examples...

http://win32assembly.online.fr/tutorials.html
Posted on 2002-08-29 13:21:28 by Guerrilla
Hello Guerrilla,

Thank you for your reply. I have all Izcelion's tutorials including labelvxd. I have studied them thoroughly before making my questions and I have studied all relevant information at http://groups.google.com/groups?q=comp.os.ms-windows.programmer.vxd&hl=en&lr=&safe=off&btnG=Google+Search&site=groups (I got this link from a post on this board by Kayaker and say thanks for the great link:)) I find the answers to my questions nowhere and perhaps I am blind but if you would be kind enough to indicate where in this tutorial are my answers it would be much appreciated.

Btw, I am familiar with starting vxd from system.ini etc, but I need dynamic vxd so I use CreateFile I could use 'VxDcall VXDLDR_LoadDevice' but how would this help.

best regards,

czDrillard
Posted on 2002-08-29 15:06:49 by czDrillard
Hi czDrillard,

I think you can append the full pathname to a vxd and have your app find it in a specific directory like this. I've assumed \\.\ stood for the Windows Path, however it's defined.

VxDName db "\\.\C:\temp\it.vxd",0
or
VxDName db "\\.\\temp\it.vxd",0

If you leave your vxd in the local installed directory, are you saying your app can't find it if you startup automatically? Does your app start up on the taskbar? I don't understand why this would happen if you placed the vxd in the same folder as your app, or specified it as above. The CreateFileA call should be the only variable in this really.

I thought you might like that link if you hadn't seen it before ;-) That's where all the VxD programmer / heads hang out. The kernel programming board is a good source of low level system information as well.

Cheers,
Kayaker
Posted on 2002-08-29 19:49:04 by Kayaker
Oh...

I didn't quite get the problem the first time... but I do now..

It's indeed just the pathname that is incorrect.
When I used this code it works fine..

....
LOCAL buffer[128]:BYTE

....

invoke GetCurrentDirectory,128,addr buffer
invoke MessageBox,hDlg,addr buffer,addr AppName,MB_OK ;="c:\"

invoke SetCurrentDirectory,addr szDir ;-> points to directory with vxd

invoke GetCurrentDirectory,128,addr buffer
invoke MessageBox,hDlg,addr buffer,addr AppName,MB_OK ; -> directory with vxd
Posted on 2002-08-30 03:23:15 by Guerrilla
Hello everybody,

All information I have read indicates that the vxd must be installed in the windows\system directory, at least when the app starts from the system tray. I'm hoping that I have misunderstood because if I ever wrote an app for distribution I wouldn't want it to be messing in somebody's system directory. They probably wouldn't like it to either:)

Kayaker:

Yes, I have a short cut on the task bar to my app. If I start from there everything ok (or if I start the exe from within its own directory it's ok). I also can set the app to install in the tray and run at startup. If I do that then the vxd my app uses is not found after a re-start even though it's in the same directory as the exe file. Weird, huh? As I said if I move the vxd out of the local folder and into the Windows\System directory all works well! This '\\.\' just seems to append the full path to the vxd but it must be doing something else that I'm not aware of because if I define it as "C:\temp\my.vxd",0 it doesn't work. I'll try "\\.\C:\temp\my.vxd",0 and see what happens. Thanks for your answer .

Guerrilla:

I never thought of SetCurrentDirectory. That is something I will try just to point the program to where my vxd lives:) I agree, there is something wrong with the path and the loader is not pointing to the right place. Thanks for your answer.

best regards,

czDrillard
Posted on 2002-08-30 10:31:01 by czDrillard