Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than ole32, prefix the name with the module name and a period.
CoCreateInstance (ole32)
.
VB Signature:
<DllImport("ole32.dll", ExactSpelling:=True, PreserveSig:=False)> _
Function CoCreateInstance( _
ByRef clsid As Guid, _
<MarshalAs(UnmanagedType.Interface)> ByVal punkOuter As Object, _
ByVal context As Integer, _
ByRef iid As Guid) _
As <MarshalAs(UnmanagedType.Interface)> Object
End Function
Guid CLSID_ShellDesktop = new Guid("00021400-0000-0000-C000-000000000046");
Type shellDesktopType = Type.GetTypeFromCLSID(CLSID_ShellDesktop, true);
object shellDesktop = Activator.CreateInstance(shellDesktopType);
The CoCreateInstanceEx API
1/4/2012 9:58:36 AM - -5.202.143.191
Indicates the execution contexts in which an object is to be run
2/14/2012 8:54:10 PM - Z-Human-74.71.149.147
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).