Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of DllImport for LockFile, & UnlockFile prevents running under Silverlight #10

Closed
GoogleCodeExporter opened this issue Mar 8, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link


Use of DllImport for LockFile, LockFileEx & UnlockFile prevents running
under Silverlight

    [DllImport( "kernel32", SetLastError = true )]
    static extern int LockFile(int hFile, int dwFileOffsetLow, int
dwFileOffsetHigh, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh);

    [DllImport( "kernel32", SetLastError = true )]
    static extern int LockFileEx(int hFile, int dwFlags, int dwReserved,
int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh, ref OVERLAPPED
lpOverlapped);
    const int LOCKFILE_EXCLUSIVE_LOCK = 0x00000002;

    [DllImport( "kernel32", SetLastError = true )]
    static extern int UnlockFile( IntPtr hFile, int dwFileOffsetLow, int
dwFileOffsetHigh, int nNumberOfBytesToUnlockLow, int
nNumberOfBytesToUnlockHigh );


in referenced in os_win_c.cs and used by the locking routines

This prevents fulling running under Silverlight

Original issue reported on code.google.com by noah.hart@gmail.com on 7 Aug 2009 at 4:08

@GoogleCodeExporter
Copy link
Author

Original comment by noah.hart@gmail.com on 24 Aug 2009 at 10:29

  • Added labels: Priority-Critical
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Changed usage to FileStream.Lock/Unlock; Moved LockFileEx into its own issue

Original comment by noah.hart@gmail.com on 24 Aug 2009 at 11:59

  • Changed title: Use of DllImport for LockFile, & UnlockFile prevents running under Silverlight
  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant