News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

shell.dll exports question

Started by Zen, July 02, 2015, 09:51:57 AM

Previous topic - Next topic

Zen

I'm wondering,...this is kind of a bizarre question,...
I was playing around with Japheth's COMView, and I found this COM Class (actually the CLSID),...and, it looked interesting,...
It's name is: COpenControlPanel,...and it's supposedly exported from shell.dll,...(this is the [Default] location string associated with the  InprocServer32 SubKey).   
When I run dumpbin on shell.dll with the /EXPORTS option in the command line, I get an enormous number of exported functions,...and, most of them are exported by ordinal,...but, no, COpenControlPanel.   
...So, I'm wondering,...is there a way to determine which ordinal is actually COpenControlPanel ???

...Or, maybe,...I should just write a COM Client app and call CoCreateInstance using the CLSID (or, maybe using a Class Moniker),...
What do you think ???

dedndave

COM interfaces won't show up in exports because they are virtualized methods
i.e., they might look more like data than code, until you call them

Yuri

COM server DLLs export a function named DllGetClassObject. It's used to obtain a ClassFactory object, which in turn is used to create the object you need. CoCreateInstance probably does all this behind the scenes.

Zen

Quote from: DAVE!!!COM interfaces won't show up in exports because they are virtualized methods.
Thanks, DAVE,...I didn't know that,...:icon_eek:

dedndave

i think you probably did know it - it just hasn't sunk in, yet - lol
remember - COM interfaces are essentially "structures" filled with code vectors   :t
they're not referenced by name, but by registered CLSID

Zen

DAVE !!!
...And, all this time I thought you were merely a 'Device Context groupie',...:bgrin:

dedndave

i understand just enough of both to be hazardous - lol

Zen

...Well,...again,...thanks,...DAVE !!!
You're so well informed,...I wish I had your brain,...

FORTRANS


K_F

A question on this...

Does a COM object register itself every time it runs, or only once on installation.
Just thinking that if it only registers it's GUI on running then DllGetClassObject/CoCreateInstance would likely fail, or do these two functions load the DLL for you ? :icon_confused:
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

Zen

Hi, VAN,   
Typically a COM CoClass (an InprocServer32 DLL) is only registered once when it is installed. The code (Register Server) makes a number of Registry entries that the COM Library uses to determine the location of the server. The client application calls CoCreateInstance, using the CLSID, and the SCM loads the COM DLL (if it is an InprocServer) and, returns a pointer to the Com Class's Virtual Function Table.