var Still_Image: IStillImageW; H_Res: HResult; pwszAppName: PWideChar; pwszCommandLine: PWideChar; wszAppName: array[0..1000] of WideChar; wszCommandLine: array[0..1000] of WideChar; ........ begin ........ H_Res := StiCreateInstanceW(GetModuleHandle(nil), STI_VERSION, @Still_Image, nil); if H_Res <> S_OK then raise ............... FillChar(wszAppName, SizeOf(wszAppName), 0); FillChar(wszCommandLine, SizeOf(wszCommandLine), 0); pwszAppName := StringToWideChar('Calculator', @wszAppName, SizeOf(wszAppName)-1); pwszCommandLine := StringToWideChar('c:\WINDOWS\system32\calc.exe', @wszCommandLine, SizeOf(wszCommandLine)-1); H_Res := 0; H_Res := Still_Image.RegisterLaunchApplication(pwszAppName, pwszCommandLine); if H_Res <> S_OK then raise ............... ............... ............... |