Click here to Skip to main content
15,917,971 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
QuestionSound Blaster Pin
Cmania19-Jan-07 20:20
Cmania19-Jan-07 20:20 
AnswerRe: Sound Blaster Pin
#realJSOP20-Jan-07 1:11
professional#realJSOP20-Jan-07 1:11 
AnswerRe: Sound Blaster Pin
markkuk20-Jan-07 2:56
markkuk20-Jan-07 2:56 
QuestionReliability/High Avilability (for a .NET mission-critical application) Pin
sjordine19-Jan-07 7:51
sjordine19-Jan-07 7:51 
AnswerRe: Reliability/High Avilability (for a .NET mission-critical application) Pin
Dave Kreskowiak19-Jan-07 8:09
mveDave Kreskowiak19-Jan-07 8:09 
Questionroot/cimv2 namespace not getting connected for classes other than Win32_OperatingSystem Pin
Manasi D15-Jan-07 18:06
Manasi D15-Jan-07 18:06 
AnswerRe: root/cimv2 namespace not getting connected for classes other than Win32_OperatingSystem Pin
Dave Kreskowiak15-Jan-07 19:29
mveDave Kreskowiak15-Jan-07 19:29 
GeneralRe: root/cimv2 namespace not getting connected for classes other than Win32_OperatingSystem Pin
Manasi D17-Jan-07 2:15
Manasi D17-Jan-07 2:15 
Thanks for your reply .My connection works. Please find a part of my code:
(uReturn value is always zero for any class other than Win32_OperatingSystem,for which it is 1)

IWbemServices *pSvc = NULL;

hres = pLoc->ConnectServer(
_bstr_t(L"ROOT\\cimv2"),NULL,NULL,0,
NULL,0,0,
&pSvc);

if (FAILED(hres))
{
AfxMessageBox(_T("Could not connect"));
pLoc->Release();
CoUninitialize();
return 1;
}

AfxMessageBox(_T("Connected to ROOT\\wmi WMI namespace"));


hres = CoSetProxyBlanket(
pSvc,
RPC_C_AUTHN_WINNT,
RPC_C_AUTHZ_NONE,
NULL,
RPC_C_AUTHN_LEVEL_CALL,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE
);

if (FAILED(hres))
{

AfxMessageBox(_T("Could not set proxy blanket"));
pSvc->Release();
pLoc->Release();
CoUninitialize();
return 1; }

IEnumWbemClassObject* pEnumerator = NULL;
hres = pSvc->ExecQuery(
bstr_t("WQL"),
bstr_t("SELECT * FROM Win32_CDROMDrive"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumerator);

if (SUCCEEDED(hres)){

IWbemClassObject *pclsObj = NULL;
ULONG uReturn = 0;

while (pEnumerator)
{
HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
&pclsObj, &uReturn);

if (FAILED(hr)){
AfxMessageBox("Failed");
}

if(0 == uReturn)
{
break;
}

VARIANT vtProp;

hr = pclsObj->Get(L"Name", 0, &vtProp, 0, 0);
CString OS = vtProp.bstrVal;
AfxMessageBox(OS);
VariantClear(&vtProp);
}
if(pclsObj) pclsObj->Release();

My connection is made..in tha last step, after querying, uReturn value is zero, and loop breaks.
Where am i going wrong? I am a beginner in this. Please excuse if there is some silly mistake i did.


GeneralRe: root/cimv2 namespace not getting connected for classes other than Win32_OperatingSystem Pin
Dave Kreskowiak17-Jan-07 7:11
mveDave Kreskowiak17-Jan-07 7:11 
QuestionAsus Mainboard USB problem Pin
The ANZAC15-Jan-07 10:42
The ANZAC15-Jan-07 10:42 
AnswerRe: Asus Mainboard USB problem Pin
The ANZAC17-Jan-07 12:20
The ANZAC17-Jan-07 12:20 
QuestionPlease Guide Me Pin
Ashish Porwal15-Jan-07 5:15
Ashish Porwal15-Jan-07 5:15 
AnswerRe: Please Guide Me Pin
Trollslayer22-Jan-07 7:15
mentorTrollslayer22-Jan-07 7:15 
Questionfirewall Pin
rituparn15-Jan-07 2:50
rituparn15-Jan-07 2:50 
AnswerRe: firewall Pin
Dave Kreskowiak15-Jan-07 5:51
mveDave Kreskowiak15-Jan-07 5:51 
AnswerRe: firewall Pin
MatrixCoder16-Jan-07 6:25
MatrixCoder16-Jan-07 6:25 
QuestionStand Alone CCTV DVR (JPEG2000)? Anyone? Pin
Gavin Roberts15-Jan-07 1:56
Gavin Roberts15-Jan-07 1:56 
QuestionScreen goes blank during windows 2003 installation. Pin
Sam's Den14-Jan-07 18:32
Sam's Den14-Jan-07 18:32 
AnswerRe: Screen goes blank during windows 2003 installation. Pin
Michael Dunn14-Jan-07 18:36
sitebuilderMichael Dunn14-Jan-07 18:36 
GeneralRe: Screen goes blank during windows 2003 installation. Pin
Sam's Den14-Jan-07 19:01
Sam's Den14-Jan-07 19:01 
AnswerRe: Screen goes blank during windows 2003 installation. Pin
dpsingh_115-Jan-07 22:22
dpsingh_115-Jan-07 22:22 
GeneralRe: Screen goes blank during windows 2003 installation. Pin
Sam's Den16-Jan-07 18:17
Sam's Den16-Jan-07 18:17 
GeneralRe: Screen goes blank during windows 2003 installation. Pin
dpsingh_117-Jan-07 16:37
dpsingh_117-Jan-07 16:37 
GeneralRe: Screen goes blank during windows 2003 installation. Pin
Sam's Den17-Jan-07 19:07
Sam's Den17-Jan-07 19:07 
QuestionDVD Burner oddness Pin
Ray Cassick13-Jan-07 17:25
Ray Cassick13-Jan-07 17:25 

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.