will the handle in multiple instances(same executable file) keep the same

Started by xiahan, April 14, 2012, 02:52:07 PM

Previous topic - Next topic

xiahan



case WM_INITDIALOG:
         ::SetTimer( hDlg, 101, 300, NULL );
         return true;

// if running more instances of HookInjEx,
// keep their interface consistent
case WM_TIMER:
          bChecked = (IsDlgButtonChecked( hDlg, IDC_BUTTON ) == BST_CHECKED);
          if( g_bSubclassed && !bChecked) {
              ::CheckDlgButton( hDlg, IDC_BUTTON, BST_CHECKED );
              ::SetDlgItemText( hDlg, IDC_BUTTON, "Unmap Dll" );
                }
          else if (!g_bSubclassed && bChecked) {
              ::CheckDlgButton( hDlg, IDC_BUTTON, BST_UNCHECKED );
              ::SetDlgItemText( hDlg, IDC_BUTTON, "Inject Dll" );
               }
          break;





i start several times of the program , and the just behaves the same , but how can it be ?

qWord

what handle?
If you create the dialog, you will create a new object instance and handle.
FPU in a trice: SmplMath
It's that simple!

dedndave

Quotewill the handle in multiple instances(same executable file) keep the same

no   :P

it acts the same because you reference the hDlg parameter
for example...
              ::CheckDlgButton( hDlg, IDC_BUTTON, BST_CHECKED );

xiahan

Thanks you two, i have forgot the magic power of variable that its just a mnemonic and have different values in certain circumstance

X = X + 1

hahahaha :lol

MichaelW

xiahan,

MASM Forum is the wrong place to be seeking help on DLL injection. Thread locked.
eschew obfuscation