You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my specific case I wanted to modify generated Free Pascal code to query one specific Win32_Process instead of all of them.
Generated query statement: FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_Process','WQL',wbemFlagForwardOnly);
The following naive modification does not work (and thus seems to reproduce the above error) - this should be one line: FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_Process WHERE ProcessId='+intToStr(GetProcessID),'WQL',wbemFlagForwardOnly);
What did finally work was to assign the very same query to a variable of type OLEVariant first. query:='SELECT * FROM Win32_Process WHERE ProcessId='+intToStr(GetProcessID); FWbemObjectSet:= FWMIService.ExecQuery(query,'WQL',wbemFlagForwardOnly);
Hope that helped.
Martin
Sorry. I forgot to specify; OS: Windows 10, Compiler: FPC 3.2.0 for Win64
Select * from Win32_NetworkAdapterConfiguration where.....
it's WQL is not working.
Check, pls.
Powershell is working it
The text was updated successfully, but these errors were encountered: