This document is archived and information here might be outdated.  Recommended version.


IDDECommandHandler.CanExecute Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > ID > IDDECommandHandler Interface > IDDECommandHandler.CanExecute Method
ArcGIS Developer Help

IDDECommandHandler.CanExecute Method

Indicates if the DDE command can be executed.

[Visual Basic .NET]
Public Function CanExecute ( _
    ByVal Command As String _
) As Boolean
[C#]
public bool CanExecute (
    string Command
);

Product Availability

Available with ArcGIS Desktop.

Description

For any class which implements IDDECommandHandler and which is registered in the "ESRI MX DDECommandHandlers" category, ArcMap will call this function whenever a DDE message is received to check if the class can accept the incoming DDE Command string. Returning TRUE from this function will cause ArcMap to call the Execute procedure where any required operations may be carried out. Typically the CanExecute function will check that the incoming Command string is of the format expected by the Execute code.

Remarks

Depending upon the DDE Client involved the incoming Command string may need to be converted from ANSI to Unicode to be useful within the VB environment. Code such as the following can be used to do the conversion where StrCommUni is a string variable used to hold the unicode version of the Command string:

StrCommUni = StrConv(Command, vbUnicode))

See Also

IDDECommandHandler Interface