The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ragdog on November 13, 2006, 06:28:51 PM

Title: I look for usb pen examples in masm32
Post by: ragdog on November 13, 2006, 06:28:51 PM
hi people´s

can help their me further?
I look for usb pen examples in masm32

greets
ragdog
Title: Re: I look for usb pen examples in masm32
Post by: Tedd on November 13, 2006, 08:51:47 PM
Examples to do what?

(In Windows) As long as the driver works properely, then it should be accessable like any normal disk-drive, so there's nothing special to do.


If, however, you're hoping to access it directly, then you're in for a whole lot of trouble. First you have to get past the generic usb part, and then finally access the pen-drive which will probably be fun too :bdg
Title: Re: I look for usb pen examples in masm32
Post by: ragdog on November 13, 2006, 09:18:27 PM
I look for examples to files copy to usb the pen drive
and to format this drive!

ragdog
Title: Re: I look for usb pen examples in masm32
Post by: ecube on November 13, 2006, 09:21:00 PM
something like this should help you, gets possible USB drives

DRIVE_NO_ROOT_DIR equ 1
GetUSBDrive proc
LOCAL szComplete[255]:BYTE
LOCAL nChar:DWORD
         mov nChar,65 ;loop through a-z
         @@:
        invoke wsprintf,addr szComplete, CTEXT("%c:\"), nChar
        invoke GetDriveType,addr szComplete
        .if eax!=DRIVE_NO_ROOT_DIR && DRIVE_CDROM
          invoke MessageBox,0,addr szComplete,addr szComplete,MB_OK
        .endif
        inc nChar
        cmp nChar,90
        jl @B
ret
GetUSBDrive endp
Title: Re: I look for usb pen examples in masm32
Post by: ragdog on November 13, 2006, 09:33:38 PM
thx

this work´s fine  :U
i have added DRIVE_REMOVABLE


     .if eax==DRIVE_REMOVABLE ;DRIVE_NO_ROOT_DIR && DRIVE_CDROM
          invoke MessageBox,0,addr szComplete,addr szComplete,MB_OK
      .endif

ragdog
Title: Re: I look for usb pen examples in masm32
Post by: ragdog on November 13, 2006, 10:17:42 PM
I have from this forum http://www.masm32.com/board/index.php?topic=2075.0 
the copyproccessroutine.

can help their me there still further?

i have post my source

thanks ragdog



[attachment deleted by admin]