equal
deleted
inserted
replaced
102 |
102 |
103 void KillSqlServer() |
103 void KillSqlServer() |
104 { |
104 { |
105 _LIT(KSqlSrvName, "sqlsrv.exe"); |
105 _LIT(KSqlSrvName, "sqlsrv.exe"); |
106 TFullName name; |
106 TFullName name; |
107 //RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName); |
|
108 TBuf<64> pattern(KSqlSrvName); |
107 TBuf<64> pattern(KSqlSrvName); |
109 TInt length = pattern.Length(); |
108 TInt length = pattern.Length(); |
110 pattern += _L("*"); |
109 pattern += _L("*"); |
111 TFindProcess procFinder(pattern); |
110 TFindProcess procFinder(pattern); |
112 |
111 |
119 c == TChar('_') || |
118 c == TChar('_') || |
120 c == TChar('-')) |
119 c == TChar('-')) |
121 { |
120 { |
122 // If the found name is other valid application name |
121 // If the found name is other valid application name |
123 // starting with aProcessName string. |
122 // starting with aProcessName string. |
124 //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name); |
|
125 continue; |
123 continue; |
126 } |
124 } |
127 } |
125 } |
128 RProcess proc; |
126 RProcess proc; |
129 if (proc.Open(name) == KErrNone) |
127 if (proc.Open(name) == KErrNone) |
130 { |
128 { |
131 proc.Kill(0); |
129 proc.Kill(0); |
132 //RDebug::Print(_L("\"%S\" process killed.\n"), &name); |
|
133 } |
130 } |
134 proc.Close(); |
131 proc.Close(); |
135 } |
132 } |
136 } |
133 } |
137 |
134 |