 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 10/12/2009 6:06 AM, Invisible wrote:
> C:\WINDOWS\system32\Audio3D.dll
>
> 0x100018F0 (0x02) DllGetObjectClass
> 0x10001A10 (0x03) DllCanUnloadNow
> 0x10001370 (0x04) _A3d@Create@12
>
> Fascinating stuff, eh?
That looks like a COM Dll... See if there's a .tlb file somewhere, or if
there's a type library embedded. Use oleview.exe:
http://www.microsoft.com/DownLoads/details.aspx?FamilyID=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en
--
~Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> That looks like a COM Dll... See if there's a .tlb file somewhere, or if
> there's a type library embedded. Use oleview.exe:
>
>
http://www.microsoft.com/DownLoads/details.aspx?FamilyID=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en
Ooo... shiny.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 10/12/2009 6:13 AM, Le_Forgeron wrote:
> Worse, How do you find which DLL are needed by a DLL ?
> There is a "dependancy walker" (from steve P. Miller) but that might
> not provide the argument list.
It won't. If you're lucky, the DLL will have C++ mangled names. That
will give you the types of parameters, provided you can decode the name
mangling. Good luck with that.
You'll notice some C functions often have an @ followed by a number.
IIRC, that's the number of bytes that should be on the stack when the
function is called. But, that's about as informative as it gets. No
names for the parameters, especially no description of what they do.
You're playing blind. Better be good at reading assembly to find out how
the parameters are being used. ;)
--
~Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> Nice of them to include the link to part 2. :-P
I have noticed that virtually nobody actually goes back and fixes earlier
blog links to link to subsequent parts.
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> OK, so here's a question: I think I understand how to load a DLL and
> call the functions it exports, but... how do you find out what functions
> a DLL exports?
>
> I mean, one way would be to find some documentation. But if you don't
> have any... is there some way to inspect the symbol list somehow? Can
> you get an argument list? How about type information?
Depends. Are we talking a COM supporting one? There are three flavors of
dll, one has internal entry points that you need a linking table to get
at. I.e., there is no stored internal data on what is there. Full COM
supporting ones (one ones using any such variation on the concept)
include an internal table and some standard method of "asking" what all
the calls, variables, types, etc. are. The third is a kind of hybred,
where "some" of the internals are exposed via the interface, but others
have been intentionally designed to only allow linking using the
header/table used to inform a compiler what they are.
--
void main () {
If Schrödingers_cat is alive or version > 98 {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
>>> ...see a pattern yet?
>>
>> Yes. It means Sun is too stupid to even know what a "GUID" is.
>
> This was my conclusion also.
>
> Surely the correct behaviour would be to register a single interface and
> give it a "do you support this API version?" method...
>
>>> Next time you install some program and it says "registering
>>> components" or "writing registry keys", this is what it's doing. It's
>>> registering millions of COM ClassIDs!
>>
>> Yes.
>
> Heh. I lost count of how many Office-related DLLs are in there. There's,
> like, A LOT!
>
You sure you don't have "older" versions still installed too? When you
update the JRE it tends to leave prior versions, as a "just in case your
program requires some bug that was only in 1.3.0_03, but got fixed
later. I had to go back and manual uninstall like 4-5 of these, to free
up space on my HD. I stupidly installed them in C:, and didn't realize
at the time that the small size of that was going to produce bad
results, or that Sun didn't "replace" the install, instead of just
installing a new one.
Still, you get a bit of some of that with MS too, just not as much. In
principle, the version isn't relevant, only if the function is there,
and yes, if you do need a version, the sane solution is to ask if there
is an interface that is backward compatible to it in there some place.
--
void main () {
If Schrödingers_cat is alive or version > 98 {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Patrick Elliott wrote:
> You sure you don't have "older" versions still installed too?
Yes. I disabled autoupdates. Where I work, I have to document exactly
which version of the JRE I'm running. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I have noticed that virtually nobody actually goes back and fixes
> earlier blog links to link to subsequent parts.
Indeed, part 2 links to part 1, but not the other way around...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Patrick Elliott wrote:
> Depends. Are we talking a COM supporting one? There are three flavors of
> dll, one has internal entry points that you need a linking table to get
> at. I.e., there is no stored internal data on what is there. Full COM
> supporting ones (one ones using any such variation on the concept)
> include an internal table and some standard method of "asking" what all
> the calls, variables, types, etc. are. The third is a kind of hybred,
> where "some" of the internals are exposed via the interface, but others
> have been intentionally designed to only allow linking using the
> header/table used to inform a compiler what they are.
The situation is far more complex than I imagined.
Apparently it is notionally possible to construct a DLL which actually
contains no executable code at all, only data. (Although I highly doubt
anybody *does* this...)
Man, the more you look, the more complex it gets! :-}
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
My head hurts from reading about the wild zoo of possibilities here.
Damn, I wonder if I'll ever actually figure this stuff out? :-/
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New schrieb:
> Not necessarily. But I'm pretty sure you're not going to get good
> "globally unique identifiers" by manually including english words in them.
Well, if you /know/ you're the /only/ one stupid enough to do that... :-P
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 schrieb:
> Apparently it is notionally possible to construct a DLL which actually
> contains no executable code at all, only data. (Although I highly doubt
> anybody *does* this...)
I once actually did - for a collection of self-made icons I wanted to
have displayed for certain files in Windows Explorer.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Fredrik Eriksson wrote:
> An "interface" is a list of function pointers. In C and C++ the layout
> of an interface is typically described in a header file.
I see. So without the magic table that tells you the index of each
function pointer, you can't play with COM?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Apparently it is notionally possible to construct a DLL which actually
>> contains no executable code at all, only data. (Although I highly
>> doubt anybody *does* this...)
>
> I once actually did - for a collection of self-made icons I wanted to
> have displayed for certain files in Windows Explorer.
Why not just have a bunch of .ico files?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 10/12/2009 10:34 AM, Invisible wrote:
> Well, in the case of VST, it's not that it's undocumented, just that you
> have to pay money for the documentation...
Naughty mascot. You don't have the license to create plugins. How much
is the SDK?
--
~Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Well, in the case of VST, it's not that it's undocumented, just that you
>> have to pay money for the documentation...
>
> Naughty mascot. You don't have the license to create plugins. How much
> is the SDK?
I just object to paying money for somebody to tell me the code numbers
of a set of functions, that's all.
(Kind of reminds me of that time my employer paid something like £900
for an envelope containing a sheet of paper with a number printed on it.
Like, WTF?)
It's not like I'm going to build a multi-million dollar software product
and not pay Steinburg. I'm only tinkering. ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 13 Oct 2009 10:18:33 +0200, Invisible <voi### [at] dev null> wrote:
>> An "interface" is a list of function pointers. In C and C++ the layout
>> of an interface is typically described in a header file.
>
> I see. So without the magic table that tells you the index of each
> function pointer, you can't play with COM?
Pretty much.
Even if every function had been exposed directly in DLL export tables, you
would be no better off because you would still need to know the function
signatures. The bottom line is that you cannot reasonably expect to use an
interface (of any kind, not just COM) without documentation.
--
FE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Fredrik Eriksson wrote:
> The bottom line is that you cannot reasonably
> expect to use an interface (of any kind, not just COM) without
> documentation.
Yeah, figures.
Oh well, dream on...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
>>> Apparently it is notionally possible to construct a DLL which
>>> actually contains no executable code at all, only data. (Although I
>>> highly doubt anybody *does* this...)
>>
>> I once actually did - for a collection of self-made icons I wanted to
>> have displayed for certain files in Windows Explorer.
>
> Why not just have a bunch of .ico files?
Because it would be a bunch of .ico files? lol Sort of the same reason
they make zipped files, or one sort or another, with games, for levels.
You just download/update *one* file, not dozens. Though, unlike dlls,
patchers will tend to use something similar to the "add to .zip/.rar"
function when updating things. Even windows uses icons in a dll, keeping
all the default ones in a single source file, which gets shown in cases
like where you have a file that doesn't have its own internal icon, and
you try to change the one being used.
But, yeah. I forgot that dlls can also just be sort of like resource
forks too.
--
void main () {
If Schrödingers_cat is alive or version > 98 {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> (Kind of reminds me of that time my employer paid something like £900 for
> an envelope containing a sheet of paper with a number printed on it. Like,
> WTF?)
Hehe, we just paid about 4000 pounds for a 46 byte text file :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> (Kind of reminds me of that time my employer paid something like £900
>> for an envelope containing a sheet of paper with a number printed on
>> it. Like, WTF?)
>
> Hehe, we just paid about 4000 pounds for a 46 byte text file :-)
...??!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> (Kind of reminds me of that time my employer paid something like £900
>>> for an envelope containing a sheet of paper with a number printed on it.
>>> Like, WTF?)
>>
>> Hehe, we just paid about 4000 pounds for a 46 byte text file :-)
>
> ...??!
License server key for some additional packages in our CAD software. The
actual CAD software DVDs include *everything* (I hate to imagine the cost of
buying that), but packages/features are unlocked depending on your license
key. If you want to unlock more features, you just pay them some money and
they send you a new license key.
In theory you could work out how they generate the key (they use the MAC
address somehow to generate it) and then generate your own key to unlock
everything!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> License server key for some additional packages in our CAD software.
> The actual CAD software DVDs include *everything* (I hate to imagine the
> cost of buying that), but packages/features are unlocked depending on
> your license key. If you want to unlock more features, you just pay
> them some money and they send you a new license key.
>
> In theory you could work out how they generate the key (they use the MAC
> address somehow to generate it) and then generate your own key to unlock
> everything!
This is more or less how BackupExec works. We said £900 or so for them
to send us a code number to allow us to install it on another server.
Great fun, isn't it? £900 for a number.
As my boss at the time muttered, "it seems we're in the wrong line of
business".
(Seriously, why bother running a big expensive lab when we could just
sit around all day charging people extortionate amounts of mony to write
psuedorandom numbers on sheets of paper...)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> (Seriously, why bother running a big expensive lab when we could just
> sit around all day charging people extortionate amounts of mony to write
> psuedorandom numbers on sheets of paper...)
Or charge people huge amounts of money for just a set of keys (that gives
them access to a house).
They don't charge for the number, they charge for what the number will give
you access to.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> generate your own key to unlock everything!
http://www.google.com/#q=keygen
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> As my boss at the time muttered, "it seems we're in the wrong line of
> business".
Manufacturing trumps service any time. That's one of the things I don't like
about GPL software. It turns programming into a service job instead of a
manufacturing job.
It happens with payment systems too. Every time I build a payment system, I
get paid $0.03 for every $10 porn sale some college kid makes. Wrong
business indeed.
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> http://www.google.com/#q=keygen
Perhaps I won't be trying that at work :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> Can you get an argument list? How about type information?
>
> No. No.
IMHO these 2 options would make good optional features if you would like
to truly make a public .dll.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Did anybody else notice that, unlike every other GUIDE on the planet,
> these ones have a *pattern* in them?
>
> CAFE-EFAC? Oh, that's cute. ABCDEF-FEDCBA? Come on, guys...
Reminds of the old Acorn days, they used to use DEAD or DEAD-DEAD quite
frequently to mark stuff ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I found a DLL called autodisk.dll which exports half a dozen functions and
> hundreds of COM methods and properties. I found several other DLLs which
> apparently export... absolutely nothing. (Why do they exist then?)
Just been reading about .net assemblies, these are also saved as .dll files
but won't expose any "traditional" functions, maybe you found some of these
too. BTW the .net assemblies contain type and parameter info in the .dll
file, so with a suitable tool (or with a few commands from a .net language)
you can find out what's in there.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> I found a DLL called autodisk.dll which exports half a dozen functions
>> and hundreds of COM methods and properties. I found several other DLLs
>> which apparently export... absolutely nothing. (Why do they exist then?)
>
> Just been reading about .net assemblies, these are also saved as .dll
> files but won't expose any "traditional" functions, maybe you found some
> of these too. BTW the .net assemblies contain type and parameter info
> in the .dll file, so with a suitable tool (or with a few commands from a
> .net language) you can find out what's in there.
Yeah, after reading about the whole PE file format, it becomes clear
that the exported symbols are just one mere table inside the file, and
there can in fact be an arbitrary number of others. That's why a resouce
editor shows one thing, a DLL inspector shows another, and no doubt the
.NET inspector tools show something else again. There's no limit to how
much data you can shove into a PE file. (Which is a good thing, really...)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |