Debugging a Resource DLL

When you debug a resource DLL, you are debugging both the resource type and the resources that belong to the resource type.

    To debug a resource type

When your ResourceTypeControl entry point function is called, the Cluster Service checks the settings for these properties. If DebugControlFunction is set to TRUE and DebugPrefix contains a valid path, the Cluster Service creates a new Resource Monitor process for ResourceTypeControl and attaches the specified debugger to it.

    To debug a resource DLL
  1. Register the DebugEx Cluster Administrator DLL.
  2. Start Cluster Administrator.
  3. Create a new resource of the type supported by your resource DLL. Specify that the resource should run in a separate Resource Monitor. A dedicated Resource Monitor is required during debugging to help you isolate problems and insure that other resources remain unaffected by those problems.
  4. View the properties of the new resource by choosing Properties from the File menu after selecting the new resource.
  5. Click the Debug tab.
  6. In the Debug Command Prefix edit control, type the full path to your debugger. For example, if you are using MSDEV, type "c:\msdev\bin\msdev.exe."
  7. Press the OK button.
  8. Stop the Cluster Service by typing "net stop clussvc."
  9. Start the Cluster Service locally by typing the following command from the cluster directory:
    start clussvc -debug

    This command will cause a command box to be displayed with the output from the Cluster Service. As soon as the Cluster Service starts, it will start the Resource Monitor with your resource in it and attach your debugger to it. At that point you will see MSDEV being invoked. You can now set breakpoints in the DLL, such as SmbSampleOnlineThread.