Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CreateDialog() inside OllyDbg Plugin

Featured Replies

Posted

I'm wanting to create a settings dialog inside of my OllyDbg 2.xx plugin, but I'm stuck at the very first part; creating the dialog...

This is the code I'm using right now (and have successfully used in many other win32 projects before)


hSettings = CreateDialog(hollyinst, MAKEINTRESOURCE(IDD_SETTINGS), hwollymain, (DLGPROC)SettingsDialogProc);
if(hSettings != NULL){
ShowWindow(hSettings, SW_SHOW);
}else{
MessageBox(hwollymain, L"CreateDialog returned NULL", L"OllyID", MB_OK | MB_ICONINFORMATION);
}

With this hSettings always returns NULL. What am I missing?

Hi

I cannot c++ but have you try remove (DLGPROC)

example:

hSettings = CreateDialog(hollyinst, MAKEINTRESOURCE(IDD_SETTINGS), hwollymain, SettingsDialogProc);

or with &SettingsDialogProc

greets

From MSDN:

HWND WINAPI CreateDialog(

_In_opt_ HINSTANCE hInstance,

_In_ LPCTSTR lpTemplate,

_In_opt_ HWND hWndParent,

_In_opt_ DLGPROC lpDialogFunc

);

Parameters

hInstance [in, optional] A handle to the module whose executable file contains the dialog box template.

You have resources in your DLL, not in Ollydbg.exe, right? Replace hollyinst with hinstYourPluginDLL and it will work just fine. :)

  • Author

Got it working. Used a modal dialog (Thanks RaMMicHaeL).


HINSTANCE hSettingsInstance = (HINSTANCE)GetModuleHandle(L"OllyID.dll");
DialogBox(hSettingsInstance, MAKEINTRESOURCE(IDD_SETTINGS), hwollymain, (DLGPROC)SettingsDialogProc);

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.