G
Guest
Hello,
this is my code with vs20005:
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_Printer");
foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("-----------------------------------");
Console.WriteLine("Win32_Printer instance");
Console.WriteLine("-----------------------------------");
Console.WriteLine("Name: {0}", queryObj["Name"]);
}
I use wmi for found all printer name.
This is my exception:
Unable to find an entry point named 'GetCurrentApartmentType' in DLL
'wminet_utils.dll'.
The code work well in vs2003 but in vs2005 i have the exception.
I think there is a problem with the framework 2.0.
If you have any idea or info!
Best regards,
Wavemill
this is my code with vs20005:
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_Printer");
foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("-----------------------------------");
Console.WriteLine("Win32_Printer instance");
Console.WriteLine("-----------------------------------");
Console.WriteLine("Name: {0}", queryObj["Name"]);
}
I use wmi for found all printer name.
This is my exception:
Unable to find an entry point named 'GetCurrentApartmentType' in DLL
'wminet_utils.dll'.
The code work well in vs2003 but in vs2005 i have the exception.
I think there is a problem with the framework 2.0.
If you have any idea or info!
Best regards,
Wavemill