Changeset 57 for trunk/NewView/ViewStub.pas
- Timestamp:
- Jan 13, 2007, 9:02:55 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/ViewStub.pas
r33 r57 11 11 PMShl, 12 12 PmWin, 13 SysUtils, 14 DebugUnit, 15 CmdLineParameterUnit, 13 16 StartupUnit; 14 17 … … 41 44 end; 42 45 46 var 47 tmpCmdLine : String; 48 tmpPCharCmdLine : PChar; 49 43 50 Begin 51 LogEvent(LogViewStub, 'Starting' ); 52 44 53 if Startup then 45 54 begin 46 55 // Want a new instance. 47 56 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); 60 60 61 61 // set up details for launching newview … … 77 77 _WinStartApp( NULLHANDLE, // no notify window 78 78 Details, 79 Parameters, // use these rather than Details parameters,79 tmpPCharCmdLine, // use these rather than Details parameters, 80 80 // cause PM was swallowing /? the other way!! 81 81 nil, // reserved 82 82 0 ); 83 84 StrDispose(tmpPCharCmdLine); 85 83 86 end; 87 LogEvent(LogViewStub, 'Finished' ); 84 88 End.
Note:
See TracChangeset
for help on using the changeset viewer.