// AForge Video for Windows Library
// AForge.NET framework
// http://www.aforgenet.com/framework/
//
// Copyright © AForge.NET, 2007-2011
// contacts@aforgenet.com
//
namespace AForge.Video.DirectShow.Internals
{
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
///
/// Some Win32 API used internally.
///
///
internal static class Win32
{
///
/// Supplies a pointer to an implementation of IBindCtx (a bind context object).
/// This object stores information about a particular moniker-binding operation.
///
///
/// Reserved for future use; must be zero.
/// Address of IBindCtx* pointer variable that receives the
/// interface pointer to the new bind context object.
///
/// Returns S_OK on success.
///
[DllImport( "ole32.dll" )]
public static extern
int CreateBindCtx( int reserved, out IBindCtx ppbc );
///
/// Converts a string into a moniker that identifies the object named by the string.
///
///
/// Pointer to the IBindCtx interface on the bind context object to be used in this binding operation.
/// Pointer to a zero-terminated wide character string containing the display name to be parsed.
/// Pointer to the number of characters of szUserName that were consumed.
/// Address of IMoniker* pointer variable that receives the interface pointer
/// to the moniker that was built from szUserName.
///
/// Returns S_OK on success.
///
[DllImport( "ole32.dll", CharSet = CharSet.Unicode )]
public static extern
int MkParseDisplayName( IBindCtx pbc, string szUserName,
ref int pchEaten, out IMoniker ppmk );
///
/// Copy a block of memory.
///
///
/// Destination pointer.
/// Source pointer.
/// Memory block's length to copy.
///
/// Return's the value of dst - pointer to destination.
///
[DllImport( "ntdll.dll", CallingConvention = CallingConvention.Cdecl )]
public static unsafe extern int memcpy(
byte* dst,
byte* src,
int count );
///
/// Invokes a new property frame, that is, a property sheet dialog box.
///
///
/// Parent window of property sheet dialog box.
/// Horizontal position for dialog box.
/// Vertical position for dialog box.
/// Dialog box caption.
/// Number of object pointers in ppUnk.
/// Pointer to the objects for property sheet.
/// Number of property pages in lpPageClsID.
/// Array of CLSIDs for each property page.
/// Locale identifier for property sheet locale.
/// Reserved.
/// Reserved.
///
/// Returns S_OK on success.
///
[DllImport( "oleaut32.dll" )]
public static extern int OleCreatePropertyFrame(
IntPtr hwndOwner,
int x,
int y,
[MarshalAs( UnmanagedType.LPWStr )] string caption,
int cObjects,
[MarshalAs( UnmanagedType.Interface, ArraySubType = UnmanagedType.IUnknown )]
ref object ppUnk,
int cPages,
IntPtr lpPageClsID,
int lcid,
int dwReserved,
IntPtr lpvReserved );
}
}