function TMain.createLyr(LyrName, LyrPath: string): boolean;
var
emptyparam: variant;
begin
result := true;
try
TVarData(empty).vType := varError;
TVarData(empty).vError := variant(DISP_E_PARAMNOTFOUND);
Map1.ControlInterface.Layers.CreateLayer(LyrName, LyrPath, 1, emptyparam, emptyparam);
except
result := false;
end;
end;