gambit
March 26th, 2001, 08:06 PM
hi,
Is the following statement correct?
Declare Function CreateFile Lib "Kernel32" Alias "CreateFileA" (byval lpFileName as string, byval dwDesiredAccess as Long, byval dwShareMode as Long, lpSecurityAttributes as SECURITY_ATTRIBUTES, byval dwCreationDisposition as Long, byval dwFlagsAndAttributes as Long, byval hTemplateFile as Long) as Long
Type SECURITY_ATTRIBUTES
nLength as Long
lpSecurityDescriptor as Long
bInheritHandle as Long
End Type
Dim sec as SECURITY_ATTRIBUTES
Dim hDevice as Long
hDevice = CreateFile ("\\.\MyHook.vxd", 0, 0, sec, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE,0)
I do not understand why it is unable to get the handle of a VXD file which I created. But in VC++ using the same function, I am able to get it.
Hope someone can help.
Thanks
Is the following statement correct?
Declare Function CreateFile Lib "Kernel32" Alias "CreateFileA" (byval lpFileName as string, byval dwDesiredAccess as Long, byval dwShareMode as Long, lpSecurityAttributes as SECURITY_ATTRIBUTES, byval dwCreationDisposition as Long, byval dwFlagsAndAttributes as Long, byval hTemplateFile as Long) as Long
Type SECURITY_ATTRIBUTES
nLength as Long
lpSecurityDescriptor as Long
bInheritHandle as Long
End Type
Dim sec as SECURITY_ATTRIBUTES
Dim hDevice as Long
hDevice = CreateFile ("\\.\MyHook.vxd", 0, 0, sec, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE,0)
I do not understand why it is unable to get the handle of a VXD file which I created. But in VC++ using the same function, I am able to get it.
Hope someone can help.
Thanks