# SalObject

Namespace: **PPJ.Runtime.Com**

Assembly: **PPJ.Runtime.49** (4.9.0.0)

Summary description for SalObject.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SalObject : SalFunctionalClass, IDisposable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SalObject
    Inherits SalFunctionalClass
    Implements IDisposable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalObject()

Construct a new null SalObject. This class cannot be used as second-base class.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalObject(obj)

Constructs a new SalObject and wraps the specified com object instance.

| Name    | Type                                                                | Description |
| ------- | ------------------------------------------------------------------- | ----------- |
| **obj** | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

## Properties

### ![](/files/69uzLyEV3ANF4GK6pznb)AutoErrorMode

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Turns on/off automatic COM error handling.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AutoRelease

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Turns on/off auto-release mode. When true, the runtime will force the release of the underlying COM object.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Value

[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object): Returns/Sets the inner COM object instance

## Methods

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Attach(obj)

Attaches the object to this IDispatch.

| Parameter | Type                                                          | Description |
| --------- | ------------------------------------------------------------- | ----------- |
| **obj**   | [SalObject](/ppj.runtime.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Count()

get number of objects

**Returns:** [SalNumber](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateObject()

Inspects the current class for the \_CoClass member and creates the inner COM object and assigns it to the inner \_Interface member.

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateObject(progid)

Creates the com object from the progid.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **progid** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateObjectEx(host)

Creates the com object on a remote host.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **host**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateObjectEx(progid, host)

Creates the com object on a remote host.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **progid** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |
| **host**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Detach()

Releases the attached COM object.

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Dispose()

Dispose object

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetInterface(iface, iid)

Returns the requested com interface.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **iface** | [SalObject](/ppj.runtime.49/com/ppj.runtime.com.salobject.md)       |             |
| **iid**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetLastError(err)

Returns the last COM exception into a OleErrorInfo object.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **err**   | [SalOleErrorInfo](/ppj.runtime.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)HandleException(e)

handle exception

| Parameter | Type                                                                      | Description |
| --------- | ------------------------------------------------------------------------- | ----------- |
| **e**     | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsCollection()

is collection

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsDispatchValid()

Checks whether the underlying COM object is valid.

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSDisableCommit()

Indicates that the object's transactional updates cannot be committed in the present time until SalMTSEnableCommit() or SalMTSSetComplete() is called. For non-MTS components the SalMTSDisableCommit() will fail (returns false).

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSEnableCommit()

Indicates that the object’s work is not necessarily done, but that its transactional updates can be committed in their current form (stateful object). EnableCommit is the default state when an object is activated. For non-MTS components the SalMTSEnableCommit() will fail (returns false).

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSIsCallerInRole(role)

Determines whether the caller is in the specified role.

| Parameter | Type                                                          | Description |
| --------- | ------------------------------------------------------------- | ----------- |
| **role**  | [SalString](/ppj.runtime.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSIsInTransaction()

This method checks if the component is executing in the transaction context. For non-MTS components the SalMTSIsInTransaction() will fail (returns false).

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). bOk

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSIsSecurityEnabled()

This method checks for the security status. If the object is running in the client's process, there is no security checking and SalMTSIsSecurityEnabled will always return false. For non-MTS components the SalMTSIsSecurityEnabled() will fail (returnS false).

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). bOk

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSSetAbort()

Indicates that the object’s work can never be committed. The entire transaction is aborted. The object is deactivated upon return from the method. For non-MTS components the SalMTSSetAbort() will fail (returnS false).

### ![](/files/69uzLyEV3ANF4GK6pznb)MTSSetComplete()

Indicates that the object has successfully completed its work for the transaction. The object is deactivated upon return from the method that first entered the context (stateless object). For non-MTS components the SalMTSSetComplete() will fail (returns false).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Next(obj)

next object

| Parameter | Type                                                          | Description |
| --------- | ------------------------------------------------------------- | ----------- |
| **obj**   | [SalObject](/ppj.runtime.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Reset()

reset

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Skip(nElems)

skip element

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **nElems** | [SalNumber](/ppj.runtime.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salobject.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salobject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
