I've made a little proggie to translate type libraries into asm includes. If you wanna try it you can get it here
Posted on 2001-03-18 18:40:00 by Amokila
OUTSTANDING !!!! I've tried this against some of my own .asm COm things, got the same code I wrote out myself. I gave it some harder things, like the VBSCRIPT.DLL, then even riched20.dll. It just chugged along and displayed everything for me. riched20.dll essentially gives you TOM.inc, I compared it's to my hand translation. The only differences I noticed I'll assume are mistakes I made counting parameters. OUTSTANDING !!!! -------------------------------------- "I saw weird stuff in that place last night. Weird, strange, sick, twisted, eerie, godless, evil stuff. And I want in."
Posted on 2001-03-18 22:12:00 by Ernie
I am also quite impressed with this handy tool. (Thank you very much) NaN
Posted on 2001-03-18 23:32:00 by NaN
OMG this tool is incredible! Thanks a lot :)
Posted on 2001-03-18 23:58:00 by Hiroshimator
Maurice, This is a very slick tool, I tested it on riched20.dll and it work well. I am sure a lot of COM people will find this tool very useful. Compliments & Regards, hutch@pbq.com.au
Posted on 2001-03-19 04:35:00 by hutch--
Tools like this are blood in the veins of assembly for application programming. Long live assembly. bitRAKE
Posted on 2001-03-19 14:12:00 by bitRAKE
Thanx all for your compliments. Now you can get a new version of the tool at the same location. The generated include is a little bit less readible, but it now handles non dwords parameters, thanks to Ernie who pointed out the problem.
Posted on 2001-03-20 02:46:00 by Amokila
I Simply love this tool :) But im at a bit of a stand still where i want to apply it the most, I have been carefully trascribing MS AGENT com's by hand from a c++ header and wish to simply use your tool on the job, but dispite the fact i have the com's (somehow and somewhere) installed on my computer, i cant find anything that would allude to it. I have searched all HD's for 'agent', *.tlb, and *.olb with no results. Any suggestions? NaN
Posted on 2001-03-20 21:58:00 by NaN
Wow... looks like an automated Ernie... he otta feel right at home with this little puppy... :-)) Pretty cool... Would you be willing to open up the source sometime? I've been wanting to learn how to do COM programming in Delphi (I noticed you used Delphi for this)... Thanks for the toy, _Shawn
Posted on 2001-03-20 22:26:00 by _Shawn
Okee, I found my .dll's and .tbl's (im just a moron, and shouldnt trust MS FINDFILE..) Anyways, im still in the process of working in my existing code to test with the new include, but i should point out i found a :eek: BUG :eek:. Its actually a realy simple fix: MASM doesn't like hex ID's that start with letters... ie] This was an output from your tool:
sCLSID_Agent TEXTEQU <{D45FD31BH, 05C6EH, 011D1H, {09EH, 0C1H, 000H, 0C0H, 04FH, 0D7H, 008H, 01FH}}>
This is the compilable version:
sCLSID_Agent TEXTEQU <{0D45FD31BH, 05C6EH, 011D1H, {09EH, 0C1H, 000H, 0C0H, 04FH, 0D7H, 008H, 01FH}}>
Anywho, thought i would let you know, and thanks again!! NaN This message was edited by NaN, on 3/21/2001 1:03:32 AM
Posted on 2001-03-20 22:58:00 by NaN
Oooo... feel like im naggin now, :( But i found another (could be bug)... The Function prototyping produced is

  &CastName&Load IAgentEx_LoadVal ?
  &CastName&Unload IAgentEx_UnloadVal ?
  &CastName&Register IAgentEx_RegisterVal ?
Basically Showing:

As function method names, And Ernie's coinvoke method builds:

     coinvoke pInterface, IAgentEx, Load, vPath, addr pICharID, addr pIRequestID

     INTO:  IAgentEx_Load
So there is a wee bit of a standardization problem here. As the functions should build to (note the underscores):

  &CastName&_Load IAgentEx_LoadVal ?
  &CastName&_Unload IAgentEx_UnloadVal ?
  &CastName&_Register IAgentEx_RegisterVal ?
I used the word maybe off the start because im an still new to all this and could very likely be overlooking something here, but this is how it seems. NaN
Posted on 2001-03-20 23:13:00 by NaN
Ok Ok, Im sorry, this will be my last comment: I have successefully integrated the AUTOMATED output from your program into my MS AGENT work (which has become a bit complex already). Again, I cant thank you enough for the service your tool provides, but i have one last constuctive comment to add about the software: MS AGENT has a wierd proto on its Load method, it goes:

and the program interpreted it as:

I realize you shouldnt have to accomodate for such randomness, but to better support such instances, is it possible to have the program simply add a ';' infront of the created line, This way i will know if there is some manual problems to take care of..?? Ie] Have the output look like:

;IAgentEx_LoadProto typedef proto IAgentEx_LoadProto :DWORD,:DWORD,:DWORD,:DWORD
Thank for putting up with me, I realy do apprechiate what you have done thus far.. :) NaN This message was edited by NaN, on 3/21/2001 12:40:13 AM
Posted on 2001-03-20 23:31:00 by NaN
Computer CRASHED while typing this out the FIRST time... Nan, Let's hit your points in order: 1) Hex numbers Yep, good find. MASM needs the zero to tell hex from lables. When I hand-translated these (before my QE plug-in), I'd always add that zero for concistancy's sake. 2) Function protos Yep, seems like the underscore between interface name and method name disappeared. 3) VARIANT I'm not so sure about this, because I believe I've seen a VARIANT (a 32 byte structure) being passed by value. However, it could also be the case it's just assumed somehow (thru typedefs) that VARIANTS are always passed by reference (address). I just don't know. Could you send me any other info on this interface you have? C header, OleView output, etc. --------------------------- "Look, Marge, I知 sorry I haven稚 been a better husband, I知 sorry about the time I tried to make gravy in the bathtub, I知 sorry I used your wedding dress to wax the car, and I知 sorry -- oh well, let痴 just say I知 sorry for the whole marriage up to this point." This message was edited by Ernie, on 3/21/2001 11:44:37 AM
Posted on 2001-03-21 10:30:00 by Ernie
Ernie, I realize your a busy man, but your the one who first helped me overcome this VARIANT business into getting a working solution. Here is the link to the conversation: VARIANT BUSINESS.... Im also at school right now, so i dont have any other source to post, (but i did include a substantial amount of C++ header info in the above link). However, im positive it is a PASS BY VALUE, as this is how im using the 'Load' method. We both kinda concluded this is an oddity, but it is what is required. To further this, the MS AGENT Specs's shows,
IAgent::Load HRESULT Load( VARIANT vLoadKey, // data provider long * pdwCharID, // address of a variable for character ID long * pdwReqID // address of a variable for request ID ); Loads a character into the Characters collection. Returns S_OK to indicate the operation was successful. vLoadKey A variant datatype that must be one of the following: filespec The local file location of the specified character's definition file. URL The HTTP address for the character's definition file. provider An alternate character definition provider. pdwCharID Address of a variable that receives the character's ID. pdwReqID Address of a variable that receives the Load request ID.
Anywhow, im i realize this may be a bit overkill, (im not trying to annoy you) but this all the facts that i know of... NaN
Posted on 2001-03-21 12:06:00 by NaN
I've uploaded version 1.1.1 of TlbToInc The bugs reported by Nan are corrected. Even add the VARIANT parameter. Having a variant as parameter is really weird but after checking msagent C header seems to be correct. Nan: thanx for reporting those bugs
Posted on 2001-03-21 13:09:00 by Amokila
Beauuuuuuty! Amokila Thanx again... The program works prefectly as far as i can test it! This is truely a great piece of software. NaN
Posted on 2001-03-21 17:19:00 by NaN
Nan, Very good link for the variant being passed byvalue not byref, it couldn't be any clearer if it was writtin in asm (not C) E ------------------------------- "What are you gonna do? Release the dogs?! Or the bees?! Or dogs with bees in their mouth so that when they bark they shoot bees at you?"
Posted on 2001-03-21 17:39:00 by Ernie
Few people asked me where i've got the documentation for making the tool: "Use COM Interfaces to Read Type Libraries" "In Ole - Chap 3 - Type Information" MSDN Library OLE View source Code
Posted on 2001-03-22 03:34:00 by Amokila