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

Search Results for "set" in [All]

glu32

.

[DllImport("glu32.dll", SetLastError=true)]

ole32

.

[DllImport("ole32.dll", SetLastError=true)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

<DllImport("ole32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=False)> _

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=true)]

.

<DllImport("ole32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=False)> _

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

[DllImport("ole32.dll", CharSet = CharSet.Unicode)]

.

static extern void CoAllowSetForegroundWindow(

.
Documentation
[CoAllowSetForegroundWindow] on MSDN
.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

     Setting unloadDelay=INFINITE uses the system default delay (10 minutes).

.

     Setting unloadDelay=0 forces the unloading of any DLLs without any delay.

.

Setting the delay too short (or zero) can have unintended consequences, as some DLL's will return control before they have finished cleaning up resources, or they will continue executing in the background.

.

     Setting unloadDelay=INFINITE uses the system default delay (10 minutes).

.

     Setting unloadDelay=0 forces the unloading of any DLLs without any delay.

.

Setting the delay too short (or zero) can have unintended consequences, as some DLL's will return control before they have finished cleaning up resources, or they will continue executing in the background.

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.
Summary
Registers security and sets the default security values for the process, but this can't be directly called from managed code.
.

/// Do not set STAThread since CoInitializeSecurity is called

.

    // Set threading apartment

.
Summary
CoInitializeEx initializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required. Values for the dwCoInit parameter are taken from the COINIT enumeration. However, since pinvoke is a dotNET construct you should be aware that dotNET already does a COM initialization and therefore calling a CoInitializeEx function most likely will not do what you expect. This problem occurs when trying to instantiate a COM object from within dotNET where the COM objects threading model is different from dotNETs. Search on Common Language Runtime or CLR and COINIT_APARTMENTTHREADED to find posts on this issue.
.

    [DllImport("ole32.dll", CharSet = CharSet.Auto, SetLastError = true, CallingConvention = CallingConvention.StdCall)]

.
Summary
Registers security and sets the default security values for the process, but this can't be directly called from managed code.
.

/// Do not set STAThread since CoInitializeSecurity is called

.

    // Set threading apartment

.
Summary
The CoSetProxyBlanket API is not safe for use from managed code directly, you must use the .NET marshalling APIs to access the right COM functions.
.

static extern int CoSetProxyBlanket([MarshalAs(UnmanagedType.IUnknown)]

.

Please look at http://msdn2.microsoft.com/en-us/library/aa302389.aspx#secnetch09_callingservicedcompaspnet, which shows how to call CoSetProxyBlanket in C#. As this is published on the MS Patterns and Practices web site I would assume this would be OK and is safe. This reference has code and discusses the issues about transition from .net object to COM IUnknown reference using the Marshal functions.

.
Documentation
[CoSetProxyBlanket] on MSDN
.

    System.Threading.ManualResetEvent event = new System.Threading.ManualResetEvent(false);

.

    /// If set to FALSE, the caller must free the hGlobal after the final release. If set

.

    ExactSpelling=true, PreserveSig=true, CharSet=CharSet.Ansi,

.

          set {_strErrorMsg = value;}

.

     ExactSpelling=true, PreserveSig=true, CharSet=CharSet.Ansi,

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]

.

    [DllImport("ole32.dll", CharSet=CharSet.Unicode)]

.

    [DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]

.

    [DllImport("ole32.dll", CharSet = CharSet.Unicode)]

.

    ///  property pages do not support persisting their settings.

.

    [DllImport("oleaut32.dll", CharSet=CharSet.Unicode, ExactSpelling=true) ]

.
Summary
.

static extern int OleSetClipboard(IDataObject pDataObj);

.

Public Shared Function OleSetClipboard(ByVal pDataObj As System.Runtime.InteropServices.ComTypes.IDataObject) As Int32

.
Documentation
[OleSetClipboard] on MSDN
.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]

.

    [DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]

.

Guids generated with this will return the name using the FmtIdToPropStgName Function, and can be used to generate a new IPropertyStorage interface with IPropertySetStorage.Create(). The name returned will be filled to 26 chars with the letter 'a' due to the fixed size of a Guid and the fact that we're passing all zeros in the BitArray after the name finishes to reach this size.

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

    ///    Indicates that the compound file already exists and the grfMode parameter is set to STGM_FAILIFTHERE.

.

    ///    Indicates that the compound file already exists and the grfMode parameter is set to STGM_FAILIFTHERE.

.

    [DllImport("ole32.dll", CharSet = CharSet.Unicode)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

42: Win2K
.

[DllImport("ole32.dll", SetLastError=true)]

.

[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]

wer

.

[DllImport("wer.dll", SetLastError = true, CharSet = CharSet.Unicode)]

.

    <DllImport("wer.dll", SetLastError:=True, CharSet:=CharSet.Unicode)> Private Shared Function WerAddExcludedApplication(ByVal pwzExeName As String, ByVal bAllUsers As Boolean) As Integer

.

[DllImport("wer.dll", CharSet = CharSet.Unicode, SetLastError = true)]

.

[DllImport("wer.dll", CharSet = CharSet.Unicode, SetLastError = true)]

.

[DllImport("wer.dll", CharSet = CharSet.Unicode, SetLastError = true)]

.

internal static extern int WerReportSetParameter(IntPtr hReportHandle, int dwparamID, string pwzName, string pwzValue);

.

Declare Function WerReportSetParameter Lib "wer.dll" (TODO) As TODO

.
Documentation
[WerReportSetParameter] on MSDN
.

[DllImport("wer.dll", CharSet = CharSet.Unicode, SetLastError = true)]

uxtheme

.

[DllImport("uxtheme.dll", SetLastError=true)]

.

static extern int BufferedPaintSetAlpha(IntPtr hBufferedPaint, [In] ref RECT prc, byte alpha);

.

Declare Function BufferedPaintSetAlpha Lib "uxtheme.dll" (TODO) As TODO

.
Documentation
[BufferedPaintSetAlpha] on MSDN
.

public extern static Int32 CloseThemeData(IntPtr hTheme);

.

Declare Function CloseThemeData Lib "uxtheme.dll" (ByVal hTheme As IntPtr) As Int32

.

Function CloseThemeData(ByVal hTheme As IntPtr) As Int32

.
Documentation
[CloseThemeData] on MSDN
.

<DllImport("uxtheme.dll", ExactSpelling:=True, CharSet:=CharSet.Unicode)> _

.

<DllImport("uxtheme.dll", ExactSpelling:=True, CharSet:=CharSet.Unicode)> _

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

When creating the StringBuilder variable, an initial size must be set otherwise an unmanaged exception is thrown

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

<DllImport("uxtheme", ExactSpelling := True, CharSet := CharSet.Unicode)> _

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

You could use this to get the theme file name, change this style temporarily, and then set it back!

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

<DllImport("uxtheme", ExactSpelling := True, CharSet := CharSet.Unicode)> _

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

<DllImport("uxtheme", ExactSpelling := True, CharSet := CharSet.Unicode)> _

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

<DllImport("uxtheme", ExactSpelling := True, CharSet := CharSet.Unicode)> _

.

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]

.

<DllImport("uxtheme", ExactSpelling := True, CharSet := CharSet.Unicode)> _

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: