Click here to Skip to main content
15,909,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Conversion from long to CString? Pin
Le@rner2-Dec-08 17:19
Le@rner2-Dec-08 17:19 
Questionhow to read mozila firefox cookies Pin
YaronNir1-Dec-08 23:06
YaronNir1-Dec-08 23:06 
QuestionGetting Property Sheet Handle Pin
koumodaki1-Dec-08 22:27
koumodaki1-Dec-08 22:27 
QuestionRe: Getting Property Sheet Handle Pin
David Crow2-Dec-08 3:43
David Crow2-Dec-08 3:43 
AnswerRe: Getting Property Sheet Handle Pin
koumodaki2-Dec-08 19:00
koumodaki2-Dec-08 19:00 
QuestionCTreeCtrl Tree Reading Pin
Royaltvk1-Dec-08 22:22
Royaltvk1-Dec-08 22:22 
AnswerRe: CTreeCtrl Tree Reading Pin
Hamid_RT1-Dec-08 23:27
Hamid_RT1-Dec-08 23:27 
QuestionGetting hard disk name using wmi Pin
VCProgrammer1-Dec-08 21:24
VCProgrammer1-Dec-08 21:24 
Hi all,

I want to get my hard disk name I am using WMI to get it. I have Initialized com using CoInitializeEx, then i have set security levels using CoInitializeSecurity, then i Obtain the initial locator to WMI, then i have Connected to WMI through the IWbemLocator::ConnectServer method but my problem is i am not getting the right api to get hard disk name.. how can i get it???

IWbemServices *pSvc = NULL;
	
hres = pLoc->ConnectServer(
         _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace
         NULL,                    // User name. NULL = current user
         NULL,                    // User password. NULL = current
         0,                       // Locale. NULL indicates current
         NULL,                    // Security flags.
         0,                       // Authority (e.g. Kerberos)
         0,                       // Context object 
         &pSvc                    // pointer to IWbemServices proxy
         );


can anybody help me in this

thanks in advance
AnswerRe: Getting hard disk name using wmi Pin
john56321-Dec-08 21:37
john56321-Dec-08 21:37 
GeneralRe: Getting hard disk name using wmi Pin
VCProgrammer1-Dec-08 22:16
VCProgrammer1-Dec-08 22:16 
AnswerRe: Getting hard disk name using wmi Pin
SandipG 1-Dec-08 22:37
SandipG 1-Dec-08 22:37 
QuestionRe: Getting hard disk name using wmi Pin
David Crow2-Dec-08 3:52
David Crow2-Dec-08 3:52 
AnswerRe: Getting hard disk name using wmi Pin
SandipG 2-Dec-08 5:34
SandipG 2-Dec-08 5:34 
GeneralRe: Getting hard disk name using wmi Pin
David Crow2-Dec-08 5:38
David Crow2-Dec-08 5:38 
QuestionWriteFile in Vista Pin
john56321-Dec-08 20:34
john56321-Dec-08 20:34 
AnswerRe: WriteFile in Vista Pin
Stuart Dootson1-Dec-08 21:18
professionalStuart Dootson1-Dec-08 21:18 
GeneralRe: WriteFile in Vista Pin
john56321-Dec-08 21:30
john56321-Dec-08 21:30 
AnswerRe: WriteFile in Vista Pin
KarstenK1-Dec-08 21:26
mveKarstenK1-Dec-08 21:26 
GeneralRe: WriteFile in Vista Pin
john56321-Dec-08 21:33
john56321-Dec-08 21:33 
GeneralRe: WriteFile in Vista Pin
KarstenK1-Dec-08 22:04
mveKarstenK1-Dec-08 22:04 
GeneralRe: WriteFile in Vista Pin
Stuart Dootson1-Dec-08 22:05
professionalStuart Dootson1-Dec-08 22:05 
GeneralRe: WriteFile in Vista Pin
Mark Salsbery2-Dec-08 6:10
Mark Salsbery2-Dec-08 6:10 
AnswerRe: WriteFile in Vista Pin
Stuart Dootson1-Dec-08 22:08
professionalStuart Dootson1-Dec-08 22:08 
QuestionRe: WriteFile in Vista Pin
David Crow2-Dec-08 4:03
David Crow2-Dec-08 4:03 
Questionhow to change title of a child dialog? Pin
puppya1-Dec-08 20:32
puppya1-Dec-08 20:32 

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.