IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-04-02 18:00:08
Channels: 41
Logged Lines: 6229042
Size: 1806.44 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-01
[00:00]<lnvnzxu>sorry misread
[00:00]<lnvnzxu>subanark: try browsing to the dll; it should attempt to read the tlb out of it
[00:00]<lnvnzxu>assuming the tlb is embedded and you want to use the first one
[00:01]<su2zgzzc>didn't work when I tried that
[00:01]<lnvnzxu>what version of VS?
[00:01]<su2zgzzc>2005
[00:02]<tdlnr>hey is this completely legal and is it useful to use this?
[00:02]<tdlnr>Console.WriteLine(sample.sampleSum(sample.sample(2,4), sample.sample2(5,6)));
[00:02]<lnvnzxu>i'm not sure if they got that working or not; originally the managed project system team and MSBuild were going to support isolated COM
[00:02]<lnvnzxu>but i don't recall what came of it
[00:03]<su2zgzzc>I have one directory with .dlls and .exes, one directory with .libs and another with source code
[00:03]<lnvnzxu>TypeR: that would depend on the types
[00:03]<tdlnr>its returns a long
[00:03]<tdlnr>that was just sample thing the other one is completely long
[00:04]<su2zgzzc>oh I also have .hpp files
[00:05]<kjr>smellyhippy: no.. J2EE
[00:05]<lnvnzxu>subanark: tlbimp needs a tlb to generate the proxy file from; there are ways to tell it not to look in the registry to resolve tlb references, so it doesn't have to have everything registered to generate a proxy, just access to the tlbs
[00:05]<zndy_wjfnz>wb Kog :)
[00:05]<sdnffdxdlld>bitchin
[00:05]<kjr>smellyhippy: I have no idea how I'm going to hook local stuff
[00:05]<kjr>Remi_Woler: thanks
[00:05]<sdnffdxdlld>neither have i ;)
[00:05]<kjr>smellyhippy: I guess I can have it run JS... but how am I going to have it hook stuff like a cash drawer
[00:05]<su2zgzzc>I don't have any tlbs
[00:05]<kjr>or a printer
[00:05]<lnvnzxu>you could directly invoke tlbimp to generate the RCW
[00:05]<kjr>I guess the printer part will be easily enough accomplished - looks like there's printing stuff in Nutscrape's JS
[00:05]<lnvnzxu>subanark: they are likely embedded in the dlls
[00:06]<lnvnzxu>if you open the dll in visual studio, it should open it in the resource editor
[00:06]<lnvnzxu>you should see a tlb section
[00:06]<kjr>peterhu: sup dude
[00:06]<lnvnzxu>with the RCW, all you would then need is a correctly formatted isolated COM manifest file, so that XP loader knows how to locate the COM components without checking the registry
[00:06]<lnvnzxu>hey kog
[00:07]<su2zgzzc>The c++ example uses LoadLibrary on the dll and the .hpp files to call the methods. When I open the .dll in vs all I see is a version
[00:07]<mjzymyrnyrxv>FINALLY...
[00:07]<lnvnzxu>that doesn't sound like a COM component then
[00:07]<mjzymyrnyrxv>have I missed much?
[00:07]<lnvnzxu>can you open a visual studio 2005 command prompt and do "dumpbin /exports foo.dll"?
[00:08]<su2zgzzc>All the interfaces have a base of IUnknown
[00:08]<lnvnzxu>does it have a DllRegisterServer?
[00:09]<lnvnzxu>if it's not self-registering and there's no tlb, there's no easy way of using it from managed code
[00:09]<su2zgzzc>It has DLLCanUnloadNow, DllGetClassObject, DllRegisterServer DllUnregisterServer
[00:10]<lnvnzxu>weird
[00:10]<lnvnzxu>yet no internal tlb and no external ones shipped with it?
[00:11]<lnvnzxu>i mean, they don't *have* to use a tlb, but it makes certain things impossible without one
[00:11]<lnvnzxu>like using a default COM marshaller
[00:11]<lnvnzxu>assuming there's no tlb, i'm affraid you're going to have to register it; assuming that does anything at all
[00:12]<lnvnzxu>afraid
[00:12]<su2zgzzc>Is that just for build, would there be anyway to delay load the dll so I don't get an error when it starts up?
[00:13]<mjzymygo>ahah!
[00:13]<mjzymygo>got me back
[00:13]<y-gz>Does anyone have an idea what is inheritance when we talk about Components?
[00:13]<su2zgzzc>well its not that important, I can just write a script in front that does the registering
[00:13]<y-gz>what does mean a component to inherit a base class o0
[00:13]<lnvnzxu>COM components rarely get referenced in an import table, so there's nothing to delay load; typically when one creates a COM component, the loader checks the register (or a manifest file) for the location, and does a LoadLibrary
[00:13]<su2zgzzc>But how would I register the components then?
[00:14]<lnvnzxu>regsvr32 should LoadLibrary and then GetProcAddress on DllRegisterServer
[00:14]<lnvnzxu>standard tool for registering a COM component, you'll find it on all versions of windows
[00:17]<su2zgzzc>I called regsvr32 on the dll, and it said it worked, but what did it export?
[00:17]<su2zgzzc>I mean does that mean it actually registered anything, or it just didn't find anything and had no problem
[00:18]<lnvnzxu>it means, literally, that DllRegisterServer returned success
[00:18]<lnvnzxu>what that function does is up to the component
[00:18]<lnvnzxu>typically, they'll register a type library, interfaces, and COM classes, to name a few
[00:18]<lnvnzxu>if it did actually register a type library, you should now see the component in the Add Reference dialog under the COM section
[00:19]<lnvnzxu>note that components usually use the module path when registering themselves, so the registry likely points at that location where you registered the dll; the component will be loaded from that directory
[00:19]<mjzymygo>uh... DLL hell
[00:24]<su2zgzzc>If I know the GUID is there some way to check it in the registry?
[00:24]<mjzymygo>use 'Find'
[00:25]<mjzymygo>regedit32
[00:25]<lnvnzxu>HKEY_CLASSES_ROOT\CLSID\<XXX>
[00:25]<mjzymygo>or use the tool OLEView if you have VC++ 6 installed
[00:25]<lnvnzxu>should at least be an entry there, assuming it's a CLSID
[00:25]<lnvnzxu>for a coclass
[00:26]<mjzymygo>or what peterhu said
[00:26]<lnvnzxu>oh, also try oleview on the dll directly
[00:26]<lnvnzxu>i'm still surprised it has no tlb =)
[00:28]<mjzymygo>sorry if in on this late...whats the component? and whats the issue?
[00:28]<su2zgzzc>its an internal performance tool, and the issue is I suck at c++
[00:29]<mjzymygo>and this has to do with a dll in what way?
[00:30]<su2zgzzc>The process I used in c++ to use the COM library was to use LoadLibrary on the dll and use the hpp files to call the methods
[00:31]<lnvnzxu>which is fine, but technically isn't COM, at least, isn't using a COM activation
[00:31]<su2zgzzc>but all the interfaces inherrited from IUnknown
[00:32]<mjzymygo>doesn't sound activeX com to me
[00:33]<rgvjgys`>is it possible to make a method array?
[00:33]<rgvjgys`>like void[]
[00:33]<rgvjgys`>?:)
[00:33]<mjzymygo>was this dll third party
[00:33]<mjzymygo>or in house
[00:33]<vxznrm_>antonis`, no
[00:33]<rgvjgys`>damn:)
[00:33]<vxznrm_>but it's possible to make a delegate array
[00:33]<rgvjgys`>?
[00:33]<mjzymygo>thread... you can make a delegate array
[00:33]<su2zgzzc>Doesn't appear in the CLSID. Can I just add it manaually?
[00:33]<vxznrm_>Moridin8, exactly
[00:33]<mjzymygo>which is kinda what you want
[00:34]<rgvjgys`>eh unlucky
[00:34]<mjzymygo>hehe.. you beat me to the punch
[00:34]<vxznrm_>heh ;)







