Forum Discussion

tuanlv's avatar
tuanlv
Regular Visitor
4 years ago
Solved

TestComplet 14 - support for dotNET Functions

We just migrated to TC14 from TC10 and we are having this weird problem:

we are trying to hold the test from running while the application is in a non-responsive state,
we are using this code:

var affinityPtr = dotNET.System.IntPtr.zctor(intAffinity);
var process = dotNET.System_Diagnostics.Process.GetProcessById(intProcessID);
process.ProcessorAffinity = affinityPtr;

 

When we are executing the dotNET line(red color), we get an exception - "Object doesn't support this property or method"

 

check value of ProcessorAffinity:

Error: System.ComponentModel.Win32Exception (0x80004005): Access is denied
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.get_ProcessorAffinity()

 

Please help me resolve this issue. 

Thanks to all helpers, Tuan

 

 

3 Replies

  • Hey there!

    I want to join Forum to socialize with other group members and in order to obtain the answers of my technical queries. I want to attend the forum for the implementation of socialization in the software development environment.