|
-
May 19th, 1999, 09:23 AM
#1
VxD
I have a VxD already created and I have a C++ application already created. How do I use the VxD inside the C++ application. I can't rebuild the VxD because I don't have the code for it. What do I do???????
-
May 20th, 1999, 03:23 AM
#2
Re: VxD
To open VxD handle :
hKernel32Dll = LoadLibrary( "kernel32.dll" );
if( !hKernel32Dll )
{
Application->MessageBox("Cannot load Kernell32.dll event"," Error" ,MB_OK|MB_ICONSTOP);
return 0;
}
pfOpenVxDHandle = ( HANDLE ( WINAPI* ) (HANDLE )) GetProcAddress( hKernel32Dll, "OpenVxDHandle" );
if( !pfOpenVxDHandle )
{
Application->MessageBox("Cannot Get Address of pfOpenVxDHandle ","Mardll Error" ,MB_OK|MB_ICONSTOP);
return 0;
}
hDevice = CreateFile(VxDName, 0, 0 , 0, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, 0);
if (hDevice == INVALID_HANDLE_VALUE)
{
char serr[256];
err = GetLastError();
sprintf(serr, "Cannot load VxD, error=%08lx\n", err );
Application->MessageBox(serr,"Error" ,MB_OK|MB_ICONSTOP) return 0;
}
FreeLibrary(hKernel32Dll);
To call VxD procedure something like
Success = DeviceIoControl(hDevice,
IOCTL_GPD_SEND_BUF_WIN32, // Handle to device
NULL, // Buffer from driver.
0, // Length of buffer in bytes.
sig+, // Buffer to driver.
bSize, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
and
CloseHandle(hDevice);
at end
-
May 21st, 1999, 06:08 PM
#3
Re: VxD
Can you please suggest me some books or Internet sites from where I can get started with writing VXDs for windows ?
Actually I want to access the System Timer 8253 at the rate of 44Khz or more & trap system H/w interrupts.
Thanx
Surinder
ICQ #3760 3760
-
May 22nd, 1999, 03:27 AM
#4
Re: VxD
Hi,
With regard to VxD books I have found the following to be useful:
Writing Windows VxD's and Device Drivers - by Karen Hazzah
System programming for Windows95 - by Walter Oney
Try http://www.amazon.com the book people for more titles.
The following sites may be useful:
http://www.vireo.com/vireo.htm
http://www.chsw.com/ddk/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|