Fix : AV in the implementation generator.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@876 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2009-06-29 10:42:54 +00:00
parent 73d1b45eb8
commit e5e00893ef

View File

@ -1712,17 +1712,27 @@ var
end;
procedure GenerateRegistrationProc();
Var
strBuff : string;
var
strBuff, locClassName, locInterfName : string;
Begin
NewLine();
BeginAutoIndent();
strBuff := ExtractserviceName(AIntf);
locClassName := strClassName;
locInterfName := QuotedStr(AIntf.Name);
NewLine();
WriteLn('procedure Register%sImplementationFactory();',[strBuff]);
WriteLn('Begin');
IncIndent();
WriteLn('GetServiceImplementationRegistry().Register(%s,TImplementationFactory.Create(%s,wst_GetServiceConfigText(%s)) as IServiceImplementationFactory);',[QuotedStr(AIntf.Name),strClassName,QuotedStr(AIntf.Name)]);
strBuff := Format(
'GetServiceImplementationRegistry().Register(' +
'%s,' +
'TImplementationFactory.Create(' +
'%s,wst_GetServiceConfigText(%s)' +
') as IServiceImplementationFactory);',
[locInterfName,locClassName,locInterfName]
);
WriteLn(strBuff);
DecIndent();
WriteLn('End;');
EndAutoIndent();