Click to See Complete Forum and Search --> : VXD


gambit
March 23rd, 2001, 03:49 AM
How do I do a CreateFile in VB which can be done using VC++?
And DeviceIoControl in VB?
These two functions are found in Kernel32.lib

Thank You!

cksiow
March 23rd, 2001, 06:18 PM
I think what you need to do is to create a DLL in VC which will call CreateFile & DeviceIoControl that access the device driver and export those much high level functions to VB.

for instance, if you happen to have a look at the packet driver in the microsoft DDK. The build the VXD and also program a DLL to access the VXD, in this way, VB don't have to deal with the VXD and talk directly to the DLL.

let me know if you need to know how to write DLL in VC so that VB can use it.

Hope this help.

gambit
March 24th, 2001, 11:35 AM
Hi,

Thanks for your suggestion.
It will be great if you can show me how to write a simple sample DLL communicating with VXD using VC in VB.
DOes this means that this DLL file will always have to follow VB exe file?
Is there a way to compile the functions in VC into VB?

Thank You!

cksiow
March 24th, 2001, 09:30 PM
Sorry, I am still not so expert to be able to write a VXD myself, thus wasn't able to write the DLL myself as well.

However, I am studying one of the DDK example, which has all those source code for VXD, DLL etc. you can download individual DDK sample from microsoft website.

try

http://www.microsoft.com/ddk

however, it's quite huge in size, so i recommend you to just download the network example, which have everything that u need.

I am not sure, but I don't think u have a way to do it in VB (to compile the function in VC into VB), unless you rewrite the code in VB. in VC, I know you can statically link it, not sure on VB. let me know if you able to do it.