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
-
Register the DebugEx Cluster Administrator DLL.
-
Start Cluster Administrator.
-
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.
-
View the properties of the new resource by choosing Properties from the File menu after selecting the new resource.
-
Click the Debug tab.
-
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."
-
Press the OK button.
-
Stop the Cluster Service by typing "net stop clussvc."
-
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.