Hi everybody, I have some questions, so I think that it is by last hope :) 1) How to get to know, that a new UDP/TCP port has been opened not so far (just in time it was opened) 2) How it is possible to write/read a sector form hard drive/floppy drive, so as it was in DOS with INT 25/26? 3)How to access a memory port? (for instance CMOS - 71/70)? I am really sorry for my BAD english, but... This message was edited by Hiroshimator, on 3/20/2001 2:23:08 PM
Posted on 2001-03-20 12:24:00 by DMD
DMD, I'll answer best I can :- 1) To find out which TCP/UDP port has been opened, you can either write your own winsock.dll, implementing all the functions in there and forwarding the calls to the real winsock.dll which you rename, then you can keep a mapped area of memory to notify you when it's done. Or you can use the net staticstics to see them. try looking at www.sysinternals.com, they have a program which does this, the techniques they use are described there. 2) You have to use a system call called DevieIoControl, take a look in the msdn.microsoft.com website for information on accessing the hardware like that. 3) To access a memory port, you'd have to write a device driver, windows won't let you play with hardware directly. This will be tricky...... Umbongo
Posted on 2001-03-20 14:02:00 by umbongo
With acesssing IO ports, you go through the systems protection system. What i am meaning, is that it is perfectly possible, if windows want to allow it. e.g. You cant get cocky and think your gonna be able to write directly to the hard disk, but then again, the below code works fine, that because all it does is turn on your computers speaker, display a message box, then turn it off.


in al,61h
or al,3
out 61h,al
mov al,5
out 42h,al
in al,61h
or al,3
out 61h,al
mov al,5
out 42h,al

dsText szMessage,"Press ok to end the tone"
invoke MessageBox ,NULL,ADDR szMessage,NULL,MB_OK

in al,61h
or al,0
out 61h,al
mov al,1
out 42h,al
in al,61h
or al,0
out 61h,al
mov al,0
out 42h,al

Posted on 2001-03-21 00:12:00 by George
hey george, i just wanted to ask you, where do you know that from? is there a documentation on stuff like that? bye
Posted on 2001-03-21 03:37:00 by [SaFc0n]
It Depends on what OS you are using, 95 and 98 will let you do that sort of thing, all other versions of windows will not. Umbongo
Posted on 2001-03-21 03:46:00 by umbongo
ok, i see. but that doesn't really answer my question. looking forward to get perhaps a documentation on that. bye
Posted on 2001-03-21 04:54:00 by [SaFc0n]
Nah sorry, I translated that code snippet from a dos source maybe a year and a half ago, so even if I could remember where and what, you wont gain much from it. :(
Posted on 2001-03-22 05:23:00 by George