Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from sergey-s-betke/test

+ добавлена и протестирована обёртка над FindMimeFromData
  • Loading branch information...
commit c530b44c042ee379228eb21c203f6bffdd257e5f 2 parents bb86607 + cf7fe62
@sergey-s-betke authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 ITG.WinAPI.psm1
View
19 ITG.WinAPI.psm1
@@ -1,6 +1,7 @@
Add-Type @"
using System;
+using System.IO;
using System.Runtime.InteropServices;
namespace ITG {
@@ -32,6 +33,24 @@ public class WinAPI {
SetForegroundWindow(
IntPtr hWnd
);
+
+ // http://msdn.microsoft.com/en-us/library/ms775107(VS.85).aspx
+ // http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/d79e76e3-b8c9-4fce-a97d-94ded18ea4dd
+ [DllImport("urlmon.dll", CharSet = CharSet.Auto)]
+ public
+ static
+ extern
+ System.UInt32
+ FindMimeFromData(
+ System.UInt32 pBC,
+ [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pwzUrl,
+ [MarshalAs(UnmanagedType.LPArray)] byte[] pBuffer,
+ System.UInt32 cbSize,
+ [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pwzMimeProposed,
+ System.UInt32 dwMimeFlags,
+ out System.UInt32 ppwzMimeOut,
+ System.UInt32 dwReserverd
+ );
}
Please sign in to comment.
Something went wrong with that request. Please try again.