@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Retrieves information about the current hardware profile for the local computer. !!!!C# Signature: [DllImport("advapi32.dll", SetLastError=true)] static extern bool GetCurrentHwProfile(IntPtr fProfile); !!!!VB Signature: !!!!User-Defined Types: [StructLayout(LayoutKind.Sequential)] class HWProfile { public Int32 dwDockInfo; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 39)] public string szHwProfileGuid; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szHwProfileName; } !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: IntPtr lHWInfoPtr = Marshal.AllocHGlobal(123); HWProfile lProfile=new HWProfile(); Marshal.StructureToPtr(lProfile,lHWInfoPtr,false); if (GetCurrentHwProfile(lHWInfoPtr)) { Marshal.PtrToStructure(lHWInfoPtr, lProfile); string lText=lProfile.szHwProfileGuid.ToString(); } Marshal.FreeHGlobal(lHWInfoPtr); Documentation: GetCurrentHwProfile@msdn on MSDN
Edit advapi32.GetCurre...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.