Ignore:
Timestamp:
Jan 13, 2007, 9:02:55 PM (19 years ago)
Author:
RBRi
Message:

more log output; assembler calls removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NewView/ViewStub.pas

    r33 r57  
    1111  PMShl,
    1212  PmWin,
     13  SysUtils,
     14  DebugUnit,
     15  CmdLineParameterUnit,
    1316  StartupUnit;
    1417
     
    4144end;
    4245
     46var
     47    tmpCmdLine : String;
     48    tmpPCharCmdLine : PChar;
     49
    4350Begin
     51  LogEvent(LogViewStub, 'Starting' );
     52
    4453  if Startup then
    4554  begin
    4655    // Want a new instance.
    4756
    48     // Get address of parameters, ignoring first (exename).
    49     ASM
    50       MOV ESI, SYSTEM.ArgStart    // Get start of parameters
    51 
    52       // read over exe name (until first null byte)
    53 !rrloop:
    54       LODSB
    55       CMP AL,0
    56       JNE !rrloop
    57 
    58       MOV Parameters, ESI
    59     End;
     57    tmpCmdLine := nativeOS2GetCmdLineParameter;
     58    tmpPCharCmdLine := StrAlloc(length(tmpCmdLine) + 1);
     59    StrPCopy(tmpPCharCmdLine, tmpCmdLine);
    6060
    6161    // set up details for launching newview
     
    7777    _WinStartApp( NULLHANDLE, // no notify window
    7878                  Details,
    79                   Parameters, // use these rather than Details parameters,
     79                  tmpPCharCmdLine, // use these rather than Details parameters,
    8080                              // cause PM was swallowing /? the other way!!
    8181                  nil, // reserved
    8282                  0 );
     83
     84    StrDispose(tmpPCharCmdLine);
     85
    8386  end;
     87  LogEvent(LogViewStub, 'Finished' );
    8488End.
Note: See TracChangeset for help on using the changeset viewer.