Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

LoadWithDotNet – PB Docs 2022 – PowerBuilder Library

LoadWithDotNet – PB Docs 2022

LoadWithDotNet

PowerScript function

Description

Loads a .NET (6.0 or later) assembly.

Applies to

DotNetAssembly

Syntax

Argument

Description

assemblypath

The name and location of the .NET assembly
(*.dll).

The location can be an absolute path or a relative path.
When a relative path is executed in the development
environment, it is relative to the location of the PBT file;
when a relative path is executed in the production
environment, it is relative to the installation location of
the application’s executable file.

Return value

Integer.

Returns values as follows. If any argument’s value is null, the
method returns null.

1 — Success.

-1 — Unknown error.

-2 — Could not find the assembly.

-3 — It’s not a valid assembly.

-4 — The assembly requires a dependent assembly.

Usage

If an application uses LoadWithDotNetCore and LoadWithDotNet at the
same time, the .NET Runtime cannot be the same version, otherwise the
subsequent execution will fail to load. You need to specify different
versions of the .NET Runtime. For the LoadWithDotNet function, the version
can be specified by modifying the pbdotnetinvoker.runtimeconfig.json file.
For more details, refer to https://docs.microsoft.com/en-us/dotnet/core/run-time-config/.

Examples

The following example loads a DLL with .NET (6.0 or later):

See also

GetContextService

GetDotNetCoreVersion

LoadWithDotNet

LoadWithDotNetFramework

LoadWithDotNetCore

PostEvent

TriggerEvent

TriggerEvent (.NET
method)


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x