<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Peter's blog</title>
	<atom:link href="http://blog.peter.skarpetis.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.peter.skarpetis.com</link>
	<description></description>
	<lastBuildDate>Sat, 13 Feb 2010 00:51:05 +1100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Manly Dam mountain biking track by Brett</title>
		<link>http://blog.peter.skarpetis.com/archives/2008/05/04/manly-dam-mountain-biking-track/comment-page-1/#comment-9680</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Sat, 13 Feb 2010 00:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2008/05/04/manly-dam-mountain-biking-track/#comment-9680</guid>
		<description>I like the Google Map interface. Cool</description>
		<content:encoded><![CDATA[<p>I like the Google Map interface. Cool</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by Old Duster</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9678</link>
		<dc:creator>Old Duster</dc:creator>
		<pubDate>Wed, 20 Jan 2010 04:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9678</guid>
		<description>Great work Peter and others.
In case it helps anyone, here&#039;s my VB6 conversion.
(Not elegant yet, but appears to work).

Option Explicit

Private Const DIGCF_PRESENT As Integer = &amp;H2
Private Const DIGCF_DEVICEINTERFACE As Integer = &amp;H10
Private Const DIGCF_ALLCLASSES As Integer = &amp;H4
Private Const GENERIC_READ = &amp;H80000000
Private Const GENERIC_WRITE = &amp;H40000000
Private Const FILE_FLAG_SEQUENTIAL_SCAN = &amp;H8000000
Private Const FILE_ATTRIBUTE_HIDDEN = &amp;H2
Private Const FILE_ATTRIBUTE_NORMAL = &amp;H80
Private Const FILE_SHARE_READ = &amp;H1
Private Const FILE_SHARE_WRITE = &amp;H2
Private Const OPEN_ALWAYS = 4
Private Const OPEN_EXISTING = 3

Private Type GUID
   Data1    As Long
   Data2    As Integer
   Data3    As Integer
   Data4(7) As Byte
End Type

Private Type Device_Interface_Data
    cbSize As Long
    InterfaceClassGuid As GUID
    Flags As Long
    ReservedPtr As Long
End Type
    
Private Type Device_Interface_Detail
    cbSize As Long
    DataPath(256) As Byte
End Type

Private Declare Function SetupDiGetDeviceInterfaceDetail _
        Lib &quot;setupapi.dll&quot; Alias &quot;SetupDiGetDeviceInterfaceDetailA&quot; _
        (ByVal DeviceInfoSet As Long, DeviceInterfaceData As Any, _
        DeviceInterfaceDetailData As Any, _
        ByVal DeviceInterfaceDetailDataSize As Long, _
        RequiredSize As Long, ByVal DeviceInfoData As Long) As Long

Private Declare Function CreateFile Lib &quot;kernel32&quot; Alias &quot;CreateFileA&quot; _
        (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, _
        ByVal dwShareMode As Long, lpSecurityAttributes As Any, _
        ByVal dwCreationDisposition As Long, _
        ByVal dwFlagsAndAttributes As Long, _
        ByVal hTemplateFile As Long) As Long

Private Declare Sub CloseHandle Lib &quot;kernel32&quot; _
        (ByVal HandleToClose As Long)

Private Declare Function ReadFile Lib &quot;kernel32&quot; _
        (ByVal Handle As Long, ByVal BufferPtr As Long, _
        ByVal ByteCount As Long, BytesReturnedPtr As Long, _
        ByVal OverlappedPtr As Long) As Long

Private Declare Function WriteFile Lib &quot;kernel32&quot; _
        (ByVal Handle As Long, Buffer As String, _
        ByVal ByteCount As Long, BytesReturnedPtr As Long, _
        ByVal OverlappedPtr As Long) As Long

Private Declare Function SetupDiGetClassDevs Lib &quot;setupapi.dll&quot; _
        Alias &quot;SetupDiGetClassDevsA&quot; (GuidPtr As Long, _
        ByVal EnumPtr As Long, ByVal hwndParent As Long, _
        ByVal Flags As Long) As Long

Private Declare Function SetupDiDestroyDeviceInfoList _
        Lib &quot;setupapi.dll&quot; _
        (ByVal DeviceInfoSet As Long) As Boolean

Private Declare Function SetupDiEnumDeviceInterfaces _
        Lib &quot;setupapi.dll&quot; (ByVal Handle As Long, _
        ByVal InfoPtr As Long, GuidPtr As Long, _
        ByVal MemberIndex As Long, _
        InterfaceDataPtr As Long) As Boolean


Private Sub Command1_Click()
    Text1.Text = SendToUsbPrinter(&quot;Hello world.&quot;)
End Sub

Function SendToUsbPrinter(PrintOut As String) As Boolean
Dim PrnGuid As GUID
Dim Success As Long, Ret As Long
Dim Openned As Boolean
Dim Buffer(256) As Byte
Dim DeviceInterfaceData As Device_Interface_Data
Dim FunctionClassDeviceData As Device_Interface_Detail
Dim PnPHandle As Long, BytesReturned As Long
Dim I As Long
Dim DeviceName As String, DevIndex As Long, DeviceHandle As Long
Dim ReqdSize As Long
Dim BytesWritten As Long
    
&#039; \\?\usb#vid_0a5f&amp;pid_000a#41a081100503#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}
    PrnGuid.Data1 = &amp;H28D78FAD
    PrnGuid.Data2 = &amp;H5A12
    PrnGuid.Data3 = &amp;H11D1
    PrnGuid.Data4(0) = &amp;HAE
    PrnGuid.Data4(1) = &amp;H5B
    PrnGuid.Data4(2) = &amp;H0
    PrnGuid.Data4(3) = &amp;H0
    PrnGuid.Data4(4) = &amp;HF8
    PrnGuid.Data4(5) = &amp;H3
    PrnGuid.Data4(6) = &amp;HA8
    PrnGuid.Data4(7) = &amp;HC2
    PnPHandle = SetupDiGetClassDevs(PrnGuid.Data1, 0, 0, _
                DIGCF_PRESENT Or DIGCF_DEVICEINTERFACE)
    SendToUsbPrinter = False
    If (PnPHandle = -1) Then
        MsgBox &quot;Could not attach to PnP node&quot;
    Else
        DeviceInterfaceData.cbSize = Len(DeviceInterfaceData)
        DevIndex = 0
        &#039; Should be a Do While -&gt; looking for the correct device-name...
        If SetupDiEnumDeviceInterfaces(PnPHandle, 0, PrnGuid.Data1, _
                      DevIndex, DeviceInterfaceData.cbSize) Then
            FunctionClassDeviceData.cbSize = 5
            Success = SetupDiGetDeviceInterfaceDetail(PnPHandle, _
                      DeviceInterfaceData, FunctionClassDeviceData, _
                      UBound(FunctionClassDeviceData.DataPath), _
                      BytesReturned, 0)
            If Success = 0 Then
                MsgBox &quot;Could not get the name of this device&quot;
            Else
                DeviceName = &quot;&quot;
                I = 0
                Do While FunctionClassDeviceData.DataPath(I)  0
                    DeviceName = DeviceName &amp; _
                                 Chr$(FunctionClassDeviceData.DataPath(I))
                    I = I + 1
                Loop
                Debug.Print DeviceName
                DeviceHandle = CreateFile(DeviceName, _
                               GENERIC_WRITE, FILE_SHARE_READ, _
                               0, OPEN_ALWAYS, _
                               FILE_ATTRIBUTE_NORMAL + FILE_FLAG_SEQUENTIAL_SCAN, _
                               0)
                If (DeviceHandle = -1) Then
                    Debug.Print &quot;Open failed on &quot; &amp; DeviceName
                Else
                    Ret = WriteFile(DeviceHandle, PrintOut, _
                                    Len(PrintOut), BytesWritten, 0)
                    Debug.Print &quot;Sent &quot; &amp; BytesWritten &amp; &quot; bytes.&quot;
                    SendToUsbPrinter = True
                    CloseHandle DeviceHandle
                End If
            End If
        Else
            MsgBox &quot;Device not connected&quot;
        End If
        SetupDiDestroyDeviceInfoList (PnPHandle)
    End If
End Function</description>
		<content:encoded><![CDATA[<p>Great work Peter and others.<br />
In case it helps anyone, here&#8217;s my VB6 conversion.<br />
(Not elegant yet, but appears to work).</p>
<p>Option Explicit</p>
<p>Private Const DIGCF_PRESENT As Integer = &amp;H2<br />
Private Const DIGCF_DEVICEINTERFACE As Integer = &amp;H10<br />
Private Const DIGCF_ALLCLASSES As Integer = &amp;H4<br />
Private Const GENERIC_READ = &amp;H80000000<br />
Private Const GENERIC_WRITE = &amp;H40000000<br />
Private Const FILE_FLAG_SEQUENTIAL_SCAN = &amp;H8000000<br />
Private Const FILE_ATTRIBUTE_HIDDEN = &amp;H2<br />
Private Const FILE_ATTRIBUTE_NORMAL = &amp;H80<br />
Private Const FILE_SHARE_READ = &amp;H1<br />
Private Const FILE_SHARE_WRITE = &amp;H2<br />
Private Const OPEN_ALWAYS = 4<br />
Private Const OPEN_EXISTING = 3</p>
<p>Private Type GUID<br />
   Data1    As Long<br />
   Data2    As Integer<br />
   Data3    As Integer<br />
   Data4(7) As Byte<br />
End Type</p>
<p>Private Type Device_Interface_Data<br />
    cbSize As Long<br />
    InterfaceClassGuid As GUID<br />
    Flags As Long<br />
    ReservedPtr As Long<br />
End Type</p>
<p>Private Type Device_Interface_Detail<br />
    cbSize As Long<br />
    DataPath(256) As Byte<br />
End Type</p>
<p>Private Declare Function SetupDiGetDeviceInterfaceDetail _<br />
        Lib &#8220;setupapi.dll&#8221; Alias &#8220;SetupDiGetDeviceInterfaceDetailA&#8221; _<br />
        (ByVal DeviceInfoSet As Long, DeviceInterfaceData As Any, _<br />
        DeviceInterfaceDetailData As Any, _<br />
        ByVal DeviceInterfaceDetailDataSize As Long, _<br />
        RequiredSize As Long, ByVal DeviceInfoData As Long) As Long</p>
<p>Private Declare Function CreateFile Lib &#8220;kernel32&#8243; Alias &#8220;CreateFileA&#8221; _<br />
        (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, _<br />
        ByVal dwShareMode As Long, lpSecurityAttributes As Any, _<br />
        ByVal dwCreationDisposition As Long, _<br />
        ByVal dwFlagsAndAttributes As Long, _<br />
        ByVal hTemplateFile As Long) As Long</p>
<p>Private Declare Sub CloseHandle Lib &#8220;kernel32&#8243; _<br />
        (ByVal HandleToClose As Long)</p>
<p>Private Declare Function ReadFile Lib &#8220;kernel32&#8243; _<br />
        (ByVal Handle As Long, ByVal BufferPtr As Long, _<br />
        ByVal ByteCount As Long, BytesReturnedPtr As Long, _<br />
        ByVal OverlappedPtr As Long) As Long</p>
<p>Private Declare Function WriteFile Lib &#8220;kernel32&#8243; _<br />
        (ByVal Handle As Long, Buffer As String, _<br />
        ByVal ByteCount As Long, BytesReturnedPtr As Long, _<br />
        ByVal OverlappedPtr As Long) As Long</p>
<p>Private Declare Function SetupDiGetClassDevs Lib &#8220;setupapi.dll&#8221; _<br />
        Alias &#8220;SetupDiGetClassDevsA&#8221; (GuidPtr As Long, _<br />
        ByVal EnumPtr As Long, ByVal hwndParent As Long, _<br />
        ByVal Flags As Long) As Long</p>
<p>Private Declare Function SetupDiDestroyDeviceInfoList _<br />
        Lib &#8220;setupapi.dll&#8221; _<br />
        (ByVal DeviceInfoSet As Long) As Boolean</p>
<p>Private Declare Function SetupDiEnumDeviceInterfaces _<br />
        Lib &#8220;setupapi.dll&#8221; (ByVal Handle As Long, _<br />
        ByVal InfoPtr As Long, GuidPtr As Long, _<br />
        ByVal MemberIndex As Long, _<br />
        InterfaceDataPtr As Long) As Boolean</p>
<p>Private Sub Command1_Click()<br />
    Text1.Text = SendToUsbPrinter(&#8221;Hello world.&#8221;)<br />
End Sub</p>
<p>Function SendToUsbPrinter(PrintOut As String) As Boolean<br />
Dim PrnGuid As GUID<br />
Dim Success As Long, Ret As Long<br />
Dim Openned As Boolean<br />
Dim Buffer(256) As Byte<br />
Dim DeviceInterfaceData As Device_Interface_Data<br />
Dim FunctionClassDeviceData As Device_Interface_Detail<br />
Dim PnPHandle As Long, BytesReturned As Long<br />
Dim I As Long<br />
Dim DeviceName As String, DevIndex As Long, DeviceHandle As Long<br />
Dim ReqdSize As Long<br />
Dim BytesWritten As Long</p>
<p>&#8216; \\?\usb#vid_0a5f&amp;pid_000a#41a081100503#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}<br />
    PrnGuid.Data1 = &amp;H28D78FAD<br />
    PrnGuid.Data2 = &amp;H5A12<br />
    PrnGuid.Data3 = &amp;H11D1<br />
    PrnGuid.Data4(0) = &amp;HAE<br />
    PrnGuid.Data4(1) = &amp;H5B<br />
    PrnGuid.Data4(2) = &amp;H0<br />
    PrnGuid.Data4(3) = &amp;H0<br />
    PrnGuid.Data4(4) = &amp;HF8<br />
    PrnGuid.Data4(5) = &amp;H3<br />
    PrnGuid.Data4(6) = &amp;HA8<br />
    PrnGuid.Data4(7) = &amp;HC2<br />
    PnPHandle = SetupDiGetClassDevs(PrnGuid.Data1, 0, 0, _<br />
                DIGCF_PRESENT Or DIGCF_DEVICEINTERFACE)<br />
    SendToUsbPrinter = False<br />
    If (PnPHandle = -1) Then<br />
        MsgBox &#8220;Could not attach to PnP node&#8221;<br />
    Else<br />
        DeviceInterfaceData.cbSize = Len(DeviceInterfaceData)<br />
        DevIndex = 0<br />
        &#8216; Should be a Do While -&gt; looking for the correct device-name&#8230;<br />
        If SetupDiEnumDeviceInterfaces(PnPHandle, 0, PrnGuid.Data1, _<br />
                      DevIndex, DeviceInterfaceData.cbSize) Then<br />
            FunctionClassDeviceData.cbSize = 5<br />
            Success = SetupDiGetDeviceInterfaceDetail(PnPHandle, _<br />
                      DeviceInterfaceData, FunctionClassDeviceData, _<br />
                      UBound(FunctionClassDeviceData.DataPath), _<br />
                      BytesReturned, 0)<br />
            If Success = 0 Then<br />
                MsgBox &#8220;Could not get the name of this device&#8221;<br />
            Else<br />
                DeviceName = &#8220;&#8221;<br />
                I = 0<br />
                Do While FunctionClassDeviceData.DataPath(I)  0<br />
                    DeviceName = DeviceName &amp; _<br />
                                 Chr$(FunctionClassDeviceData.DataPath(I))<br />
                    I = I + 1<br />
                Loop<br />
                Debug.Print DeviceName<br />
                DeviceHandle = CreateFile(DeviceName, _<br />
                               GENERIC_WRITE, FILE_SHARE_READ, _<br />
                               0, OPEN_ALWAYS, _<br />
                               FILE_ATTRIBUTE_NORMAL + FILE_FLAG_SEQUENTIAL_SCAN, _<br />
                               0)<br />
                If (DeviceHandle = -1) Then<br />
                    Debug.Print &#8220;Open failed on &#8221; &amp; DeviceName<br />
                Else<br />
                    Ret = WriteFile(DeviceHandle, PrintOut, _<br />
                                    Len(PrintOut), BytesWritten, 0)<br />
                    Debug.Print &#8220;Sent &#8221; &amp; BytesWritten &amp; &#8221; bytes.&#8221;<br />
                    SendToUsbPrinter = True<br />
                    CloseHandle DeviceHandle<br />
                End If<br />
            End If<br />
        Else<br />
            MsgBox &#8220;Device not connected&#8221;<br />
        End If<br />
        SetupDiDestroyDeviceInfoList (PnPHandle)<br />
    End If<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by The Dewd</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9677</link>
		<dc:creator>The Dewd</dc:creator>
		<pubDate>Wed, 30 Dec 2009 13:10:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9677</guid>
		<description>Sorry, the website address in my previous post was ommited. This is the url http://www.pinvoke.net/default.aspx/setupapi/SetupDiEnumDeviceInterfaces.html</description>
		<content:encoded><![CDATA[<p>Sorry, the website address in my previous post was ommited. This is the url <a href="http://www.pinvoke.net/default.aspx/setupapi/SetupDiEnumDeviceInterfaces.html" rel="nofollow">http://www.pinvoke.net/default.aspx/setupapi/SetupDiEnumDeviceInterfaces.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by The Dewd</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9676</link>
		<dc:creator>The Dewd</dc:creator>
		<pubDate>Wed, 30 Dec 2009 13:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9676</guid>
		<description>Peter, thanks so much for posting this code here. I stumbled across it after googling for 3 days to try and find some way to read and write raw data to a usb printer in C#. I can&#039;t post the code on here because my client would lose their freakin&#039; mind if they ever found out I did but I will tell anyone wanting to get it working in .NET to go here . There is some sample C# code and all the structure and constant definitions that are not included here (you have to look for them but they are on that site.) It took me an additional 2 days after finding this page to get it working but most of that time was due to bone headed mistakes on my part. 

Thanks again for this invaluable resource!</description>
		<content:encoded><![CDATA[<p>Peter, thanks so much for posting this code here. I stumbled across it after googling for 3 days to try and find some way to read and write raw data to a usb printer in C#. I can&#8217;t post the code on here because my client would lose their freakin&#8217; mind if they ever found out I did but I will tell anyone wanting to get it working in .NET to go here . There is some sample C# code and all the structure and constant definitions that are not included here (you have to look for them but they are on that site.) It took me an additional 2 days after finding this page to get it working but most of that time was due to bone headed mistakes on my part. </p>
<p>Thanks again for this invaluable resource!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by need help</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9659</link>
		<dc:creator>need help</dc:creator>
		<pubDate>Fri, 09 Oct 2009 06:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9659</guid>
		<description>any sample doin this in C#/vb .net ?

I &#039;ll use it for sending raw data to lx300 through usb to paralel converter ...

thanks</description>
		<content:encoded><![CDATA[<p>any sample doin this in C#/vb .net ?</p>
<p>I &#8216;ll use it for sending raw data to lx300 through usb to paralel converter &#8230;</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by MaybeStop</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9658</link>
		<dc:creator>MaybeStop</dc:creator>
		<pubDate>Wed, 07 Oct 2009 21:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9658</guid>
		<description>I found the ClassGUID is this the required GUID I need?

Can I just eNumerate and use the Symbolic address and just write to the port with the required data.

I am new to this so any help would be great.
Trying to use the USB to Parallel as a data port.

Thanks</description>
		<content:encoded><![CDATA[<p>I found the ClassGUID is this the required GUID I need?</p>
<p>Can I just eNumerate and use the Symbolic address and just write to the port with the required data.</p>
<p>I am new to this so any help would be great.<br />
Trying to use the USB to Parallel as a data port.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by Jyotiranjan</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9657</link>
		<dc:creator>Jyotiranjan</dc:creator>
		<pubDate>Tue, 22 Sep 2009 08:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9657</guid>
		<description>Dear Sir,
Thanks for giving code.By following you , my writefile function is returning true with Byte to write is equal to Byte written (these are two variables,which i&#039;m checking after write file API).But i&#039;m not able to print.The same string i&#039;m able to print through command prompt.it means that the command that has to sent to the printer is correct,but why its not printing ?.Kindly note that my Zebra barcode printer driver is installed and ok.</description>
		<content:encoded><![CDATA[<p>Dear Sir,<br />
Thanks for giving code.By following you , my writefile function is returning true with Byte to write is equal to Byte written (these are two variables,which i&#8217;m checking after write file API).But i&#8217;m not able to print.The same string i&#8217;m able to print through command prompt.it means that the command that has to sent to the printer is correct,but why its not printing ?.Kindly note that my Zebra barcode printer driver is installed and ok.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by Peter Skarpetis</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9646</link>
		<dc:creator>Peter Skarpetis</dc:creator>
		<pubDate>Wed, 19 Aug 2009 22:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9646</guid>
		<description>SetupDiEnumDeviceInterfaces() will only find usbprinter device nodes when a printer is attached. There is no way to simulate that, you simply have to attach a printer. There is no getting around that.</description>
		<content:encoded><![CDATA[<p>SetupDiEnumDeviceInterfaces() will only find usbprinter device nodes when a printer is attached. There is no way to simulate that, you simply have to attach a printer. There is no getting around that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by Jyotiranjan</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9645</link>
		<dc:creator>Jyotiranjan</dc:creator>
		<pubDate>Wed, 19 Aug 2009 11:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9645</guid>
		<description>Hi,
Thanks for this post.I have implemented the same way as mentioned by you.I&#039;m doing USB communication for my Barcode Printer.The code i&#039;m writing in VS2005.Its compiling fine.I have included SetupApi.lib &amp; SetupApi.h into my project but not all the header file ( #include 
#include 
#include 
#include 
#include 
#include 
)mentioned by you. I have installed the DDK and SDK given by microsoft in my PC.But the problem i&#039;m facing is in this line :-
while (SetupDiEnumDeviceInterfaces(devs, 0, &amp;intfce, devcount, &amp;devinterface)) 

While debugging,its not entering into the while loop .Is the function will return true only when the devide is attached? Why i&#039;m asking this is,becoz i have not connected my printer to the USB port.Kindly suggest some answer.If printer device is not attached, kindly tell me how to simulate the condition?? Pls. help.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for this post.I have implemented the same way as mentioned by you.I&#8217;m doing USB communication for my Barcode Printer.The code i&#8217;m writing in VS2005.Its compiling fine.I have included SetupApi.lib &amp; SetupApi.h into my project but not all the header file ( #include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
)mentioned by you. I have installed the DDK and SDK given by microsoft in my PC.But the problem i&#8217;m facing is in this line :-<br />
while (SetupDiEnumDeviceInterfaces(devs, 0, &amp;intfce, devcount, &amp;devinterface)) </p>
<p>While debugging,its not entering into the while loop .Is the function will return true only when the devide is attached? Why i&#8217;m asking this is,becoz i have not connected my printer to the USB port.Kindly suggest some answer.If printer device is not attached, kindly tell me how to simulate the condition?? Pls. help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting a handle on usbprint.sys by James</title>
		<link>http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/comment-page-3/#comment-9643</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 14 Aug 2009 22:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/#comment-9643</guid>
		<description>Thanks so much. This was so obscure and hard to find. I spent 3 days and almost got to the point of writing my own driver until I found the device class ID here and found the device path. It should have been that easy. Maybe MS will learn and at least publish this at some point.</description>
		<content:encoded><![CDATA[<p>Thanks so much. This was so obscure and hard to find. I spent 3 days and almost got to the point of writing my own driver until I found the device class ID here and found the device path. It should have been that easy. Maybe MS will learn and at least publish this at some point.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
