Click here to Skip to main content
15,892,643 members
Home / Discussions / C#
   

C#

 
GeneralRe: Xmlreader help Pin
drifters28-Mar-07 22:50
drifters28-Mar-07 22:50 
Questioncollection collection ? Pin
peterchen28-Mar-07 22:11
peterchen28-Mar-07 22:11 
QuestionListview Pin
Hampus@foi28-Mar-07 21:45
Hampus@foi28-Mar-07 21:45 
QuestionxmlWriter porblem Pin
Amr M. K.28-Mar-07 21:43
Amr M. K.28-Mar-07 21:43 
AnswerRe: xmlWriter porblem Pin
Stefan Troschuetz28-Mar-07 23:02
Stefan Troschuetz28-Mar-07 23:02 
GeneralEvent Logging Strategy and Architecture Pin
Brady Kelly28-Mar-07 21:19
Brady Kelly28-Mar-07 21:19 
Questionsending string data to parallel port? Pin
Rohit Dev28-Mar-07 21:10
Rohit Dev28-Mar-07 21:10 
AnswerRe: sending string data to parallel port? Pin
m@u28-Mar-07 23:17
m@u28-Mar-07 23:17 
Hi
yes there is. you can open the Parallel port open as a file and use FileStream to write on it.

something like this:

<br />
public class ParallelWriter<br />
{<br />
    //Constants for dwFlagsAndAttributes:<br />
    public const UInt32 FILE_FLAG_OVERLAPPED = 0x40000000;<br />
    //Constants for dwCreationDisposition:<br />
    public const UInt32 OPEN_EXISTING = 3;<br />
    //Constants for dwDesiredAccess:<br />
    public const UInt32 GENERIC_READ = 0x80000000;<br />
    public const UInt32 GENERIC_WRITE = 0x40000000;<br />
    [DllImport("kernel32.dll", SetLastError=true)]<br />
            private static extern IntPtr CreateFile(String lpFileName, UInt32 dwDesiredAccess, UInt32 dwShareMode,<br />
			IntPtr lpSecurityAttributes, UInt32 dwCreationDisposition, UInt32 dwFlagsAndAttributes,<br />
			IntPtr hTemplateFile);<br />
    private FileStream strm;<br />
    public FileStream Stream<br />
    {<br />
        get<br />
        {<br />
            return strm;<br />
        }<br />
    }<br />
    public ParallelWriter(string Port)<br />
    {<br />
         IntPtr Handle = CreateFile(Port,GENERIC_READ|GENERIC_WRITE,0,IntPtr.Zero,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,IntPtr.Zero);<br />
        strm = new FileStream(Handle,FileAccess.ReadWrite,true,1,true);<br />
    }<br />
}<br />

now just use the Stream to write your data to the Parallelport

greets
m@u
GeneralRe: sending string data to parallel port? Pin
Rohit Dev29-Mar-07 20:21
Rohit Dev29-Mar-07 20:21 
QuestionQuestion regarding ListView control? Pin
Khoramdin28-Mar-07 20:28
Khoramdin28-Mar-07 20:28 
AnswerRe: Question regarding ListView control? Pin
Saikek29-Mar-07 4:07
Saikek29-Mar-07 4:07 
Questionerror in loading application Pin
ArchaBhandare28-Mar-07 19:55
ArchaBhandare28-Mar-07 19:55 
QuestionTCP Checksum Generator Pin
Kr0d28-Mar-07 19:53
Kr0d28-Mar-07 19:53 
QuestionI have an issue on ZedGraph Control Pin
pashitech28-Mar-07 19:03
pashitech28-Mar-07 19:03 
AnswerRe: I have an issue on ZedGraph Control Pin
Pete O'Hanlon28-Mar-07 22:14
mvePete O'Hanlon28-Mar-07 22:14 
QuestionForm Control or Component, Delete, Property Notification [modified] Pin
Cnight Stalker28-Mar-07 19:00
Cnight Stalker28-Mar-07 19:00 
QuestionperformClick() Pin
quick228-Mar-07 18:36
quick228-Mar-07 18:36 
AnswerRe: performClick() Pin
giddy_guitarist31-Mar-07 5:38
giddy_guitarist31-Mar-07 5:38 
QuestionXML File processing Pin
satsumatable28-Mar-07 17:27
satsumatable28-Mar-07 17:27 
QuestionHow to add Restart Dialog to Installer Pin
remex_1980_junyongwu28-Mar-07 17:13
remex_1980_junyongwu28-Mar-07 17:13 
QuestionSnippets Pin
Mike Hankey28-Mar-07 17:07
mveMike Hankey28-Mar-07 17:07 
QuestionHow to reconnect to the server when the ethernet cable unplugged and replugged using Socket Pin
engsrini28-Mar-07 16:34
engsrini28-Mar-07 16:34 
Questionhow to use the a interface declared in a dll Pin
goldli28-Mar-07 16:21
goldli28-Mar-07 16:21 
AnswerRe: how to use the a interface declared in a dll Pin
wulixu28-Mar-07 17:31
wulixu28-Mar-07 17:31 
GeneralRe: how to use the a interface declared in a dll [modified] Pin
goldli28-Mar-07 19:15
goldli28-Mar-07 19:15 

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.