This error occurs because the function has not been added to the correct Silk Performer include (bdh) file. It occurs when a project is created using .Net explorer and has an input variable initialized from a file. When this project is exported as a Silk Performer Web Project ,a compiled error occurs saying, "Function or event handler is not declared: FileGetContent". The following code will resolve the issue and should be added into dclfunc section of your script or the verify.bdh file which can be found in Program Files\Segue\SilkPerformer 7.1\Working\Include. By adding it to the .bdh file you can be sure that this functionality will be available in future projects. Function FileGetContent(sFileName : string) : string var hFile, nSize, nRead : number; sContent : string; begin FOpen(hFile, sFileName); FSizeGet(hFile, nSize); FRead(hFile, sContent, nSize, nRead); FileGetContent := sContent; end FileGetContent; Old KB# 17969
↧