AddAssemblyReference
Adds new PB assembly files to the reference list of the current application at
runtime.
Syntax
1 |
Int AddAssemblyReference(string <var>assemblyFullPath</var>) |
Argument | Description |
---|---|
assemblyFullPath | String. A semicolon-separated list of file names. Specify the full file name with its extension. You can use a relative path if the assembly is in the same directory with the current application. Otherwise, you must use an absolute path. |
Returns
Integer. Returns 1 if all files in the list are
added successfully. If an error occurs, it returns -1. If any argument�s value is
null, it returns null.
Usage
After the function is invoked successfully at runtime, types in the
referenced assembly can be consumed in PowerBuilder .NET.
Invoking a Dynamically Loading Assembly
1 2 3 4 5 6 7 8 9 10 11 12 |
int ret ret = addassemblyreference("D:Dynamic LoadingPB150pbassembly.outin eleasepbassembly.dll") if ret = 1 then MessageBox("OK", "OK") elseif ret = -1 then MessageBox("Error", "D:Dynamic LoadingPB150pbassembly.outin eleasepbassembly.dll Not Found") else MessageBox("Error", "Null argument") end if |
Parent topic: Dynamically Loaded Assemblies
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest