OK, another try of an C++ experienced guy on Delphi.
Here is
a function to read the type of the project. Put it in the
ImportMSVCForm instead of the line
WriteDev('Project', 'Type', '0');
Here's the code:
procedure TImportMSVCForm.ReadProjectType();
var
I: integer;
P: PChar;
begin
I := 0;
while I < fSL.Count do begin
if AnsiStartsText('# TARGTYPE', fSL[I]) then begin
// got it
P := PChar(Copy(fSL[I], Length(fSL[I]) - 5, 7));
if( P = '0x0102' ) then begin // "Win32 (x86)
Dynamic-Link Library"
WriteDev('Project', 'Type', '3');
end
else if( P = '0x0103' ) then begin // "Win32 (x86)
Console Application"
WriteDev('Project', 'Type', '1');
end
else if( P = '0x0104' ) then begin // "Win32 (x86)
Static Library"
WriteDev('Project', 'Type', '2');
end
else begin // unknown
WriteDev('Project', 'Type', '0');
end;
Break;
end;
Inc(I);
end;
end;
Logged In: YES
user_id=25510
Thanks i applied this one. Please next time upload a file to
this tracker instead of copying the code directly into the
report, cause it formats differently.
Colin
Logged In: YES
user_id=591019
Yes, I know. I wanted to do a diff, but I forgot to make a
copy of the initial source, so I had to diff against CVS,
but I had my other changes in it, so the line numbers would
have been wrong. blabla...well, I will do a proper diff (as
I usually do) next time.
btw...the code formts well in the email you get from sf.net,
what is quite weird.
Logged In: YES
user_id=591019
I think you can close the bug report 706842 as well.