[fpc-pascal] TAP-Win32
José Mejuto
joshyfun at gmail.com
Thu May 13 23:58:00 CEST 2010
Hello FPC-Pascal,
Thursday, May 13, 2010, 10:42:37 PM, you wrote:
JAGdFJ> Handle := CreateFile(PChar(TAP_Device), GENERIC_READ Or
JAGdFJ> GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM Or
JAGdFJ> FILE_FLAG_OVERLAPPED, 0);
Try using:
Handle:=CreateFileA(PChar(TAP_Device), GENERIC_READ or GENERIC_WRITE,
0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
Overlapped attribute is an error for sure as non overlapped structure
is being passed. In fact I think that no FILE_xxxx is needed at all.
JAGdFJ> (translated from a C# example)
Maybe the example is wrong ;)
--
Best regards,
José
More information about the fpc-pascal
mailing list