Hy!
I'm a newbie to VB 2005 and I have to connect my program to a driver
previously developed for a custom ISA card.
With my old VB 6 code I used the routine CreateFileA exported from
kernel32 with this defination:
Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal
lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode
As Long, ByVal NULLSecurityAttributes As Long, ByVal
dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long,
ByVal NULLTemplateFile As Long) As Long
The routine was called with
Public hCVxD As Long
hCVxD = CreateFile("\\.\Driver", GENERIC_READ Or GENERIC_WRITE, 0,
sNULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, sNULL)
.... and this code works properly.
I parsed this code with the same args in VB 2005, without getting any
error during build and run-time but hCVxD goes in overflow.
What I'm doing wrong? Does anybody know a solution? Where can I find
any suggestion?
Thanks for your replies.