Desktop Functions: Smart Device Functions:
|
SHCreateStreamOnFile (shlwapi)
C# Signature:[DllImport("shlwapi.dll", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false, EntryPoint = "SHCreateStreamOnFileEx")] static extern void SHCreateStreamOnFileEx(string fileName, uint grfmode, uint dwAttributes, bool fCreate, System.Runtime.InteropServices.ComTypes.IStream streamNull, ref System.Runtime.InteropServices.ComTypes.IStream stream); Another C# Signature:[DllImport("shlwapi.dll", CharSet=CharSet.Unicode, PreserveSig=false)] static extern IStream SHCreateStreamOnFileEx(string pszFile, uint grfMode, uint dwAttributes, bool fCreate, IStream pstmTemplate);
[DllImport( "shlwapi.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false, EntryPoint="SHCreateStreamOnFileW" )] VB Signature:
Declare Function SHCreateStreamOnFileEx Lib "shlwapi.dll" (TODO) As TODO User-Defined Types:None. Alternative Managed API:Do you know one? Please contribute it! Notes:None. I have only tested this using .NET 2.0. Also note that the above import will cause the API to throw a managed exception in case of failure as opposed to returning a HRESULT error code. See StgmConstants for the flags corresponding to the mode parameter. Tips & Tricks:Please add some! Sample Code:Please add some! private System.Runtime.InteropServices.ComTypes.IStream GetComStreamForFile( string fileName ) {
System.Runtime.InteropServices.ComTypes.IStream stream = null; } Please edit this page!Do you have...
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). |
|