| View previous topic :: View next topic |
| Author |
Message |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Tue Feb 06, 2007 12:30 pm Post subject: DllCall Help -- Multi-Monitor Switch Library |
|
|
I've got a program that runs with my Acer laptop. it basically controls the function + whatever keys on the keyboard, as well as volume buttons and such
well, it appears that it uses MMDutl.dll (Dritek System Inc. Multi-Monitor Switch Library.) to manage switching between the laptop's lcd, laptop's lcd + external monitor, or just the external monitor.
i can press Fn + F5 while my "launch mananager" program is running to get this:
that works exactly like alt + tab, accept fn is the alt and f5 is the tab...
anyway, when the lanch manager is not running it will not work... so i thought id like to learn how to call the dll to do what the launch mananger is doing w/o using the launch manager.
i found a DLL Export viewer to find the functions used by this DLL, adn they are:
but i have no idea how to call those functions or anything :S
anyway, there is just an image folder withing the launch manager directory that it uses for the images
Any idea how i can re-create this with a dll call? i have NO idea how to even start since i have never used dll calls and i'm having trouble understanding them
Any help is very much appreciated!
Thanks!!
Adam
Last edited by adamrgolf on Tue Feb 06, 2007 2:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Tue Feb 06, 2007 2:42 pm Post subject: |
|
|
bump anyone have at least a starting point for me to try out? I'm having a hard time grasping what i should be typing in for the dllcall parameters.
Thanks!!
Adam |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Tue Feb 06, 2007 3:02 pm Post subject: |
|
|
Alas, the info given by the DLL Export Viewer is not enough, as it doesn't show (and cannot) which parameters are necessary. Without these (number of parameters, their type), you cannot use the functions.
Try to google for your DLL name to see if somebody published an API. |
|
| Back to top |
|
 |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Tue Feb 06, 2007 3:40 pm Post subject: |
|
|
i cant find any API information via google on this particular dll, i did find something in IDA after disassembling this DLL that looks similar to what the dllcall help file syntax looks like
| Code: | | DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) |
or this
| Code: | Attributes: library function
.text:100078F0
.text:100078F0 ; public: __thiscall strstreambuf::strstreambuf(char *, int, char *) |
or maybe this:
| Code: | | BOOL __stdcall DialogFunc(HWND,UINT,WPARAM,LPARAM) |
also found an instance of post message:
| Code: | | PostMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam) |
does that mean anything to anyone? |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Tue Feb 06, 2007 5:08 pm Post subject: |
|
|
DllMain is mandatory in all DLLs.
strstreambuf::strstreambuf looks like a standard C++ method.
DialogFunc is probably just an internal handle of the dialog message pump.
PostMessageA is a standard WinAPI.
Basically, you had a good idea, but you must look for the functions you shown in the first message. |
|
| Back to top |
|
 |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Wed Feb 14, 2007 7:56 am Post subject: |
|
|
i found this in IDA for the "Run" function, which produces the first image in my first post. Can anyone tell if the information needed to create a DllCall to recreate this is maybe in this section of IDA dissassembled code?:
| Code: | .text:003C5350 ; Exported entry 3. MMDUtl_Run
.text:003C5350
.text:003C5350 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
.text:003C5350
.text:003C5350
.text:003C5350 public MMDUtl_Run
.text:003C5350 MMDUtl_Run proc near
.text:003C5350 mov eax, dword_3D5F98
.text:003C5355 test eax, eax
.text:003C5357 jz short loc_3C5375
.text:003C5359 mov ecx, offset dword_3D5F9C
.text:003C535E call sub_3C1C20
.text:003C5363 test eax, eax
.text:003C5365 mov ecx, offset dword_3D5F9C
.text:003C536A jnz short loc_3C5378
.text:003C536C call sub_3C3C30
.text:003C5371 test eax, eax
.text:003C5373 jnz short loc_3C537D
.text:003C5375
.text:003C5375 loc_3C5375: ; CODE XREF: MMDUtl_Run+7j
.text:003C5375 xor eax, eax
.text:003C5377 retn
.text:003C5378 ; ---------------------------------------------------------------------------
.text:003C5378
.text:003C5378 loc_3C5378: ; CODE XREF: MMDUtl_Run+1Aj
.text:003C5378 call sub_3C2580
.text:003C537D
.text:003C537D loc_3C537D: ; CODE XREF: MMDUtl_Run+23j
.text:003C537D mov eax, 1
.text:003C5382 retn
.text:003C5382 MMDUtl_Run endp
.text:003C5382
.text:003C5382 ; ---------------------------------------------------------------------------
.text:003C5383 align 10h |
Or maybe can anyone take a guess at a dllcall example i could try with this just to see if it works? Something like:
| Code: | SetWorkingDir,C:\adam\ahk
res := DLLCall("volume_osd\vosdLaunch Manager\vosdLaunch Manager\MMDUtl.dll\MMDUtl_Run")
msgbox % "errorlevel: " errorlevel "`nresult: " res |
which returns 0 for error level and result, but maybe with some extra parameters i could try out |
|
| Back to top |
|
 |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Wed Feb 14, 2007 5:10 pm Post subject: |
|
|
bump any ideas? |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 634 Location: LooseChange911.com The WTC bldgs shouldn't have fallen that fast. The official story is a lie!
|
Posted: Thu Feb 15, 2007 8:19 am Post subject: |
|
|
| adamrgolf wrote: | bump any ideas? |
...only 1...assembly language...
...but it looks like you've already disassemled it into something, but it don't help me know what those params are...only other thing to try is some SysInternals (now Microsoft eek!) program that I think could watch DLL calls...but I can't think of the exact program or if I'm just confused, but I know there's a RegMon & FileMon, so perhaps there's a DLL-call monitor...Process Explorer? (more: Process Monitor, SysInternals - Process & Thread Utils)...that will show which DLLs are loaded, hopefully it can list the actual calls & maybe the params of the call...I dunno...haven't installed/used many SysInternals progs yet... _________________
Home • Click image! • Blog
Last edited by JSLover on Thu Feb 15, 2007 8:51 am; edited 1 time in total |
|
| Back to top |
|
 |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Thu Feb 15, 2007 8:51 am Post subject: |
|
|
JSLover,
Thanks for the help! I'll check into the information you posted and see what i can find.
Adam |
|
| Back to top |
|
 |
|