Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionfingerprint sensor code with c++ Pin
ibiere21-Sep-23 23:56
ibiere21-Sep-23 23:56 
AnswerRe: fingerprint sensor code with c++ Pin
CPallini22-Sep-23 0:52
mveCPallini22-Sep-23 0:52 
QuestionType of array and printf specifiers Pin
Member 114540620-Sep-23 4:40
Member 114540620-Sep-23 4:40 
AnswerRe: Type of array and printf specifiers Pin
Mircea Neacsu20-Sep-23 5:11
Mircea Neacsu20-Sep-23 5:11 
AnswerRe: Type of array and printf specifiers Pin
k505420-Sep-23 5:36
mvek505420-Sep-23 5:36 
AnswerRe: Type of array and printf specifiers Pin
CPallini20-Sep-23 5:51
mveCPallini20-Sep-23 5:51 
QuestionHow to get disk model and serial number for the disk Windows is installed on Pin
JohnCodding19-Sep-23 20:41
JohnCodding19-Sep-23 20:41 
AnswerRe: How to get disk model and serial number for the disk Windows is installed on Pin
Richard MacCutchan19-Sep-23 21:59
mveRichard MacCutchan19-Sep-23 21:59 
I am not an expert in WMI, but the issue is not that of C++ but your use of the wmic commands. You should first check the actual syntax of the commands you are trying to use. Then run them in a command window to find out the actual correct usage. I tried them both and got the following:
C:\Users\rjmac\source\repos>wmic bootconfig get description
Description
\Device\Harddisk0\Partition1  


C:\Users\rjmac\source\repos>wmic diskdrive where DeviceID=\\.\PHYSICALDRIVE0
Node - RJM-INSPIRON15
ERROR:
Description = Invalid query

So I tried this to find out what options are available with the diskdrive sub-command:
C:\Users\rjmac\source\repos>wmic diskdrive -?      

DISKDRIVE - Physical disk drive management. 

HINT: BNF for Alias usage.
(<alias> [WMIObject] | <alias> [<path where>] | [<alias>] <path where>) [<verb clause>].

USAGE:

DISKDRIVE ASSOC [<format specifier>]
DISKDRIVE CREATE <assign list>
DISKDRIVE DELETE
DISKDRIVE GET [<property list>] [<get switches>]
DISKDRIVE LIST [<list format>] [<list switches>]

The final one allows you to check the options for the command.

So the error message "Description = Invalid query" is telling you that the command is in error, and you need to find out what the correct format is.
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
Valentinor19-Sep-23 22:15
Valentinor19-Sep-23 22:15 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
Richard MacCutchan19-Sep-23 22:26
mveRichard MacCutchan19-Sep-23 22:26 
AnswerRe: How to get disk model and serial number for the disk Windows is installed on Pin
Richard MacCutchan19-Sep-23 22:28
mveRichard MacCutchan19-Sep-23 22:28 
AnswerRe: How to get disk model and serial number for the disk Windows is installed on Pin
JohnCodding19-Sep-23 22:57
JohnCodding19-Sep-23 22:57 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
David Crow20-Sep-23 2:08
David Crow20-Sep-23 2:08 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
trønderen20-Sep-23 10:34
trønderen20-Sep-23 10:34 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
jschell20-Sep-23 13:13
jschell20-Sep-23 13:13 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
trønderen21-Sep-23 6:29
trønderen21-Sep-23 6:29 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
Richard MacCutchan20-Sep-23 22:03
mveRichard MacCutchan20-Sep-23 22:03 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
jschell21-Sep-23 4:57
jschell21-Sep-23 4:57 
GeneralRe: How to get disk model and serial number for the disk Windows is installed on Pin
trønderen21-Sep-23 6:23
trønderen21-Sep-23 6:23 
AnswerRe: How to get disk model and serial number for the disk Windows is installed on Pin
Dave Kreskowiak20-Sep-23 13:23
mveDave Kreskowiak20-Sep-23 13:23 
AnswerRe: How to get disk model and serial number for the disk Windows is installed on Pin
Randor 20-Sep-23 22:34
professional Randor 20-Sep-23 22:34 
Questionwrite a progrrame create a calculator (using function) Pin
CHIRAG VAJA 202318-Sep-23 20:15
CHIRAG VAJA 202318-Sep-23 20:15 
AnswerRe: write a progrrame create a calculator (using function) Pin
Victor Nijegorodov18-Sep-23 20:26
Victor Nijegorodov18-Sep-23 20:26 
RantRe: write a progrrame create a calculator (using function) Pin
Richard Deeming18-Sep-23 21:23
mveRichard Deeming18-Sep-23 21:23 
AnswerRe: write a progrrame create a calculator (using function) Pin
jschell19-Sep-23 5:49
jschell19-Sep-23 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.