Click here to Skip to main content
15,885,365 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionTHREE TIER WITH ASP.NET WEBSERVICES Pin
sheemap14-Aug-11 11:47
sheemap14-Aug-11 11:47 
AnswerPlease don't - Repost Pin
thatraja14-Aug-11 18:18
professionalthatraja14-Aug-11 18:18 
AnswerRe: THREE TIER WITH ASP.NET WEBSERVICES Pin
Not Active14-Aug-11 18:53
mentorNot Active14-Aug-11 18:53 
QuestionDATAREPEATER GUIDE Pin
AleBio10-Aug-11 3:36
AleBio10-Aug-11 3:36 
AnswerRe: DATAREPEATER GUIDE Pin
Dave Kreskowiak10-Aug-11 7:22
mveDave Kreskowiak10-Aug-11 7:22 
AnswerRe: DATAREPEATER GUIDE Pin
Eddy Vluggen10-Aug-11 12:34
professionalEddy Vluggen10-Aug-11 12:34 
AnswerRe: DATAREPEATER GUIDE Pin
sivakumat11-Aug-11 1:34
sivakumat11-Aug-11 1:34 
QuestionSystem Enumeration - CreateClassEnumerator Pin
SarahJMR8-Aug-11 8:52
SarahJMR8-Aug-11 8:52 
Hi,

I am trying to enumerate system devices using .Net and keep receiving a null on the following code. How do I fix the problem? I saw several examples on the web, all showing similar code constructs.

C#
try
 {
 // Defined in "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\uuids.h" on line 960
 clsidSystemDeviceEnum = new Guid("62BE5D10-60EB-11d0-BD3B-00A0C911CE86");
 
// Get the COM type from the class ID.
 Type comType = Type.GetTypeFromCLSID(clsidSystemDeviceEnum);
 
// Create the COM instance for this object.
 object oEnum;
 oEnum = null;
 oEnum = Activator.CreateInstance(comType);
 
// Create the device enumerator (COM) object.
 pSysDevEnum = oEnum as ICreateDevEnum; // GetFromClsid(clsidSystemDeviceEnum) as ICreateDevEnum;
 
// Get an enumerator for the device indicated.
 if (null != pSysDevEnum)
 pSysDevEnum.CreateClassEnumerator(clsidDeviceClass, out ppEnumMoniker, dwFlags);
 else
 return;
 }
 
catch (Exception ex)
 {
 MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK);
 }




Thanks in advance,

Sarah
QuestionRe: System Enumeration - CreateClassEnumerator Pin
Shameel10-Aug-11 5:20
professionalShameel10-Aug-11 5:20 
AnswerRe: System Enumeration - CreateClassEnumerator Pin
SarahJMR10-Aug-11 5:36
SarahJMR10-Aug-11 5:36 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
Shameel10-Aug-11 5:54
professionalShameel10-Aug-11 5:54 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
SarahJMR10-Aug-11 6:02
SarahJMR10-Aug-11 6:02 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
Shameel10-Aug-11 6:10
professionalShameel10-Aug-11 6:10 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
SarahJMR10-Aug-11 6:17
SarahJMR10-Aug-11 6:17 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
Shameel10-Aug-11 9:10
professionalShameel10-Aug-11 9:10 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
SarahJMR10-Aug-11 9:11
SarahJMR10-Aug-11 9:11 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
Shameel10-Aug-11 9:14
professionalShameel10-Aug-11 9:14 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
SarahJMR10-Aug-11 9:18
SarahJMR10-Aug-11 9:18 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
Shameel10-Aug-11 9:22
professionalShameel10-Aug-11 9:22 
GeneralRe: System Enumeration - CreateClassEnumerator Pin
SarahJMR10-Aug-11 9:24
SarahJMR10-Aug-11 9:24 
Questionhi Pin
leila1234567896-Aug-11 0:08
leila1234567896-Aug-11 0:08 
Questionhi Pin
leila1234567896-Aug-11 0:06
leila1234567896-Aug-11 0:06 
AnswerRe: hi Pin
#realJSOP17-Aug-11 4:13
mve#realJSOP17-Aug-11 4:13 
QuestionNot... Is, or IsNot... Pin
Sander Rossel3-Aug-11 7:33
professionalSander Rossel3-Aug-11 7:33 
AnswerRe: Not... Is, or IsNot... Pin
Dave Kreskowiak3-Aug-11 8:52
mveDave Kreskowiak3-Aug-11 8:52 

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.