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é _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal