Menu

#4 patch for 706842

closed
nobody
None
5
2012-09-26
2004-04-27
No

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;

Discussion

  • Colin Laplace

    Colin Laplace - 2004-04-28

    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

     
  • Oliver Stöneberg

    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.

     
  • Oliver Stöneberg

    Logged In: YES
    user_id=591019

    I think you can close the bug report 706842 as well.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.