[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]
static extern Guid CLSIDFromProgID(string lpszProgID);
None.
None.
Please add some!
Alternative declaration is used!
[DllImport("ole32.dll", CharSet=CharSet.Unicode]
static extern ulong CLSIDFromProgID(string lpszProgID, ref Guid uuid);
Example
public class MyForm : System.Windows.Forms.Form
{
...
public Control AddLegacyControlAtRuntime (string ProgId)
{
Guid clsid = new Guid();
CLSIDFromProgID(ProgId, ref clsid);
_legacyControlAxHost = new LegacyControlAxHost(clsid.ToString());
this.Controls.Add(_legacyControlAxHost);
return _legacyControlAxHost;
}
...
}
(LegacyControlAxHost is custom class inherited From AxHost)
Do you know one? Please contribute it!