.386
.model flat,stdcall
option casemap:none

    include \masm32\include\Windows.inc
    include \masm32\include\kernel32.inc
    include \masm32\include\user32.inc
    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\user32.lib

.code

_spoo:    
    jmp @F  ;Declares all of the strings.  Done this way it saves 1.2kb
        szAppName   db "Clip Board Wipe",0
        szEmpty     db "The clipboard is currently empty.",0
        szFull      db "The clipboard containts copied data.",13,10,"Would you like to empty it?",0
        szSuccess   db "The clipboard was emptied successfully.",0
        szFail      db "Could not empty the clipboard!",0
        szBusy      db "Could not access the clipboard.",13,10,"It is in use by another application.",0
    @@:
    invoke OpenClipboard,NULL   ;Umm guess
        .IF eax != NULL         ;If it returns not false we control the clipboard
            invoke EnumClipboardFormats,NULL    ;get all the formats
                .IF eax == NULL                 ;No formats means no data
                    invoke MessageBox,NULL,ADDR szEmpty,ADDR szAppName,MB_ICONINFORMATION+MB_OK ;Tell the user it is empty
                .ELSE
                    invoke MessageBox,NULL,ADDR szFull,ADDR szAppName,MB_ICONQUESTION+MB_YESNO  ;Ask them for what they want to do
                        .IF eax == IDYES    ;Did they answer yes
                            invoke EmptyClipboard   ;empty that bitch
                                .IF eax             ;Did it return true?
                                    invoke MessageBox,NULL,ADDR szSuccess,ADDR szAppName,MB_ICONINFORMATION+MB_OK ;Tell the user it worked
                                .ELSE
                                    invoke MessageBox,NULL,ADDR szFail,ADDR szAppName,MB_ICONSTOP+MB_OK     ;Tell them it failed
                                .ENDIF
                        .ENDIF
                .ENDIF
        .ELSE
            invoke MessageBox,NULL,ADDR szBusy,ADDR szAppName,MB_ICONSTOP+MB_OK             ;No clipboard for us
        .ENDIF           
    invoke CloseClipboard       ;close it
        invoke ExitProcess,NULL ;free our mememory
            ret
end _spoo