Adds new PB assembly files to the reference list of the current application at runtime.
Int AddAssemblyReference(string assemblyFullPath)
Argument | Description |
---|---|
assemblyFullPath | String. A semicolon-separated list of file names. Specify the full file name with its extension. It can be a relative path if the assembly is in the same directory with the current application. Otherwise, it must be an absolute path. |
Integer. Returns 1 if all files in the list are successfully added. If an error occurs, it returns -1. If any argument’s value is null, it returns null.
After the function is invoked successfully at runtime, types in the referenced assembly can be consumed in PB .NET.
int ret ret = addassemblyreference("D:\Dynamic Loading\PB125\pbassembly.out\bin\release\pbassembly.dll") if ret = 1 then MessageBox("OK", "OK") elseif ret = -1 then MessageBox("Error", "D:\Dynamic Loading\PB125\pbassembly.out\bin\release\pbassembly.dll Not Found") else MessageBox("Error", "Null argument") end if