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

COMPONENT (Structures)
 
.
Summary
Contains the desktop item options.
Summary
TODO - a short description

C# Definition:

[StructLayout(LayoutKind.Sequential)]
public struct COMPONENTSOPT
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode, Pack = 8)]
public struct COMPONENT
{
     public static readonly int SizeOf = Marshal.SizeOf(typeof(COMPONENTSOPT));
     private const int INTERNET_MAX_URL_LENGTH = 2084; // = INTERNET_MAX_SCHEME_LENGTH (32) + "://\0".Length +   INTERNET_MAX_PATH_LENGTH (2048)
     public static readonly int SizeOf = Marshal.SizeOf(typeof(COMPONENT));

     public int dwSize;
     public int dwID;
     public CompType iComponentType;
     [MarshalAs(UnmanagedType.Bool)]
     public bool fEnableComponents;
     public bool fChecked;
     [MarshalAs(UnmanagedType.Bool)]
     public bool fActiveDesktop;
}

VB Definition:

<StructLayout(LayoutKind.Sequential)> _
Public Structure COMPONENTSOPT
    Public Shared ReadOnly SizeOf As Integer
    Public dwSize As Integer
    <MarshalAs(UnmanagedType.Bool)> _
    Public fEnableComponents As Boolean
    <MarshalAs(UnmanagedType.Bool)> _
    Public fActiveDesktop As Boolean
    Shared Sub New()
    COMPONENTSOPT.SizeOf = Marshal.SizeOf(GetType(COMPONENTSOPT))
    End Sub
End Structure
     public bool fDirty;
     [MarshalAs(UnmanagedType.Bool)]
     public bool fNoScroll;
     public COMPPOS cpPos;
     [MarshalAs(UnmanagedType.ByValTStr, SizeConst=260)]
     public string wszFriendlyName;
     [MarshalAs(UnmanagedType.ByValTStr, SizeConst=INTERNET_MAX_URL_LENGTH)]
     public string wszSource;
     [MarshalAs(UnmanagedType.ByValTStr, SizeConst=INTERNET_MAX_URL_LENGTH)]
     public string wszSubscribedURL;

User-Defined Field Types:

None.

     public int dwCurItemState;
     public COMPSTATEINFO csiOriginal;
     public COMPSTATEINFO csiRestored;
}

Notes:

VB Definition:

Structure COMPONENT
   Public TODO
End Structure

User-Defined Field Types:

None.

Documentation

Notes:

static readonly Guid CLSID_ActiveDesktop = new Guid("{75048700-EF1F-11D0-9888-006097DEACF9}");

public static IActiveDesktop GetActiveDesktop()
{
     Type typeActiveDesktop = Type.GetTypeFromCLSID(CLSID_ActiveDesktop);
     return (IActiveDesktop) Activator.CreateInstance(typeActiveDesktop);
}

IActiveDesktop dt = GetActiveDesktop();
int iCount;
dt.GetDesktopItemCount( out iCount, 0 );
COMPONENT comp = new COMPONENT();
for ( int i = 0; i < iCount; i++ )
{
    comp.dwSize = COMPONENT.SizeOf;
    dt.GetDesktopItem( i, ref comp, 0 );
    //...
}

.

Documentation
COMPONENT on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions