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.

MSIL in DllMain?

Featured Replies

Posted

I currently am getting around it by doing

CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Init, 0, 0, 0);

But from what I understand, when you create a thread in DllMain it queues it up to be executed after DllMain executes. So how can I have a MSIL DeInit function? Creating a thread wont work because it will execute after the dll is no longer in memory.

you could possibly try using createremotethread on yourself... createremotethread behaves somewhat differently

  • Author
you could possibly try using createremotethread on yourself... createremotethread behaves somewhat differently

CreateThread uses CreateRemoteThread :P . I may try opening the current process and doing that but I think it would queue every new thread.

yep, but with slightly different parameters...

for example...

make 2 exe's, one is a launcher, the other a dumb program that prints some output

program 1 -> launch and suspend program 2

program 1 -> createremotethread on the now suspended program...

what happens?

well, the thread actually runs, even though the process its 'attached' to is suspended

thus createthread != createremotethread

which is why i suggested trying it

  • Author
yep, but with slightly different parameters...

for example...

make 2 exe's, one is a launcher, the other a dumb program that prints some output

program 1 -> launch and suspend program 2

program 1 -> createremotethread on the now suspended program...

what happens?

well, the thread actually runs, even though the process its 'attached' to is suspended

thus createthread != createremotethread

which is why i suggested trying it

I am talking about DllMain though. Which when it is executing there is a lock in place.

http://blogs.msdn.com/oldnewthing/archive/...04/4731478.aspx

http://download.microsoft.com/download/a/f...LL_bestprac.doc

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.