Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

_lopen (kernel32)
 
.
Summary
TODO - a short description

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr _lopen(string lpPathName, int iReadWrite);
// https://blog.csdn.net/a1037949156/article/details/79069649/

User-Defined Types:

#region AccessMode
public const int OF_READ = 0;
public const int OF_WRITE = 1;
public const int OF_READWRITE = 2;
#endregion

#region ShareMode
public const int OF_SHARE_COMPAT = 0x0;
public const int OF_SHARE_EXCLUSIVE = 0x10;
public const int OF_SHARE_DENY_WRITE = 0x20;
public const int OF_SHARE_DENY_READ = 0x30;
public const int OF_SHARE_DENY_NONE = 0x40;
#endregion

Notes:

Tips & Tricks:

User-Defined Types:

#region AccessMode
public const int OF_READ = 0;
public const int OF_WRITE = 1;
public const int OF_READWRITE = 2;
#endregion

#region ShareMode
public const int OF_SHARE_COMPAT = 0x0;
public const int OF_SHARE_EXCLUSIVE = 0x10;
public const int OF_SHARE_DENY_WRITE = 0x20;
public const int OF_SHARE_DENY_READ = 0x30;
public const int OF_SHARE_DENY_NONE = 0x40;
#endregion

Sample Code:

IntPtr Handle = lopen("TargetPath", OFREADWRITE | OF_SHARE_COMPAT);

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

IntPtr Handle = lopen("TargetPath", OFREADWRITE | OF_SHARE_COMPAT);

Documentation
_lopen on MSDN

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions