SignalStarted (coredll)
Last changed: anonymous

.
Summary
When an application is launched from the registry HKLM\init, that application must call the SignalStarted function to notify the operating system that the application has been launched.

C# Signature:

[DllImport("coredll.dll")]
static extern void SignalStarted(UInt32 dw);

VB Signature:

Declare Sub SignalStarted Lib "coredll.dll" (ByVal dw As UInt32)

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

dw is an unsigned integer type parameter that corresponds to the launch code of the application in the HKLM\init registry. ie. If the registry value "Launch25" corresponds to the application that you want to launch, the application that you launch should call SignalStarted(25) when it has launched.

Tips & Tricks:

Make sure you add the System.Runtime.InteropServices namespace as a reference to your project to use the DllImport function. Then use/import them into your project at the top of your desired C#/VB code file.

Sample Code:

[DllImport("coredll.dll")]

private static extern void SignalStarted(UInt32 dw);

private void button1_Click(object sender, EventArgs e)

{

    SignalStarted(25);

}

Documentation