Hi, I got a side project on the go that in VB doesnt seem to be much of a challenge (mainly because you dont need to think in VB)... But in W32asm.. its looking difficult.. (or from a newby perspective anyways :) Im wanted make use of the microsoft agent talkin engine in my windows practices (kinda spice them up if you will), but I need some direction as how to build an .inc for com objects.. (as i learned all the .dll's dont export anything when i used l2inca.exe ) I also have a complete list of headers for VC++ but they are huge and i most likely dont need all of them off the start.. (dont care about the Listing Engine API's etc.) However, my thoughts on this is perhaps some of them could be translated into Macros??? There is alot of documentation on the MSDN so i think i can build the stuctures as i run across the need for them, but i was hopping if someone could give me a push in the right direction to start up such a project... (Advice etc) My thought were to build and debug a simple hello world example in VB and debug it form there.. (but this can and will be tedious and if there is a better approach i would love to hear it... ) Thanx. NaN
Posted on 2001-01-22 01:39:00 by NaN
heh... Ernie I know this should probably be you'rs to reply but here we go..;) try http://here.is/ComInAsm ... >;)
Posted on 2001-01-22 02:14:00 by NervGaz
Sure, sure, as soon as I get scripting to work in asm, YOU GUYS want me to get it to TALK? I just went and took a peek at the MS speech SDK. 150 friggin megs! I sure ain't gonna d/l that to answer a Q Nan, sure, it's possible, looks reasonably doably even. But it's NOT a beginner's project. You will be translating .h to .inc files by yourself, possibly some automated, but definately not everything. COM interfaces are still hand work to include. GUIDs too. If you can't understand my scripting in asm app tutorial you cannot accomplish this. Go see some of my writings, and if you ain't scared off yet, make another post.
Posted on 2001-01-22 04:21:00 by Ernie
I dont scare easily.... I may not understand something off the start.. but i only try harder... Thanx for the early advise, its noted and respected but Im not ready to call it off yet... I figured there would be alot of hand work involved and i have the time/patiences to go at it.. i have done activex controls before in VB and seem easy enought to understand, as well as a text on the subject.. but again.. no one is talkin in asm but us... :) Thanx again... i will try not to badger you guys to much... NaN
Posted on 2001-01-22 19:21:00 by NaN
BTW: where did you find a 150MB d/l on the MSDN?? I didnt come across that... but then again i find the MSDN too convoluted and hard to use... :(
Posted on 2001-01-22 19:22:00 by NaN
You can dl v5 of the speech sdk at: http://msdn.microsoft.com/code/sample.asp?url=/msdn-files/027/000/781/msdncompositedoc.xml
Posted on 2001-01-22 19:43:00 by Varunun
In MSDN, hit DOWNLOADS, search it for "speech sdk" You best get well aquainted with MSDN. It's like bringing Raymond to Los Vegas. (You know, that guy from Rainman. He's not too bright, but when he knows something it can be worth a fortune)
Posted on 2001-01-23 01:09:00 by Ernie
Interesting Discription... I read though you first tutorial today (the short-cut tut.) and had no problems following where your going with it.. I will admit.. I dont think I would have been able to get it together so elegantly.. but it made sense as i understand them already. I doubt im ready to tinker yet.. but I *think* i see alot of parallels between your tut and my simple idea... This is the VB for creating the Talking Agent: Dim WithEvents MyAgent as Agent (Point of interest here) Dim Genie as IAgentCtlCharacterEx (point of interest here) Sub Form_Load ' Create an instance of the control using New Set MyAgent = New Agent ' Open a connection to the server MyAgent.Connected = True ' Load the character into the Characters collection MyAgent.Characters.Load "Genie", " Genie.acs" ' Create a reference to the character Set Genie = MyAgent.Characters("Genie") End Sub As i see it, with the IID known, all i need to do is translate form the C++ headers the Agent object and the IAgentCtlCharacterEx into Objectized stuctures.. and then follow you coding example to get it initialized... How am i doing with this? (suggestions are welcome if your not too tire with the topic :) NaN
Posted on 2001-01-23 01:33:00 by NaN
In asm, this might look like so: .data ;Dim WithEvents MyAgent as Agent (Point of interest here) MyAgent DWORD 0 ;Dim Genie as IAgentCtlCharacterEx (point of interest here) Genie DWORD 0 ; interface pointers are just dwords in asm .code ;Sub Form_Load .IF uMsg == WM_CREATE ;' Create an instance of the control using New ;Set MyAgent = New Agent ; next line fudge, I don't know what interface Agent should supply, I am calling it IAgent invoke CoCreateInstance, CLSID_Agent, NULL, CLSCTX_REMOTE_SERVER, pIID_IAgent, ADDR Genie, ;' Open a connection to the server ;MyAgent.Connected = True coinvoke MyAgent, IAgent, Connected, TRUE ;' Load the character into the Characters collection ;MyAgent.Characters.Load "Genie", " Genie.acs" coinvoke MyAgent, IAgent, Load, ADDR bstrGenie, ADDR bstrGenie_acs ;' Create a reference to the character ;Set Genie = MyAgent.Characters("Genie") coinvoke MyAgent, IAgent, Characters, ADDR Genie, ADDR bstrGenie ;End Sub .ELSE IF uMsg == First the good news: even though the speech object lives in it's own exe process space, you as the client can pretend it's in your very own process and forget that detail, as COM is taking care of all the remoting cross process details for you, and giving you a stub in your address space that looks just like the external object. The bad news... Well, your first huge problem will be: Dim WithEvents MyAgent as Agent (Point of interest here) 'WithEvents' means you will be supporting the callback interfaces that Agent expects you to be supplying. Mind you, I'm assuming here Agent is an exported object of the sound API, I have not read any of that documentation. Event callbacks work thru a mechanism known as connection points (using IConnectionPoint, of course). Client and server do a little dance thru their interfaces to connect together. First, client queries server for IConnectionPointContainer. If this exists, events are exported. Then client asks thru this interface "Do you export interface X?," the server replies Y or N. If yes, it also returns an object to add connections to, an event manager object supporting IConnectionPoint. The client uses this interface to supply the server with references to the event callback interfaces. When the event occures, these callback interfaces are fired. Note these callback interfaces must match those the server is expecting to find. They will be documented, probably both in the SDK and in the type library (run OLE VIEWER and browse out the speech classes). I've not really done any work with these interfaces. You don't have too bad a problem here, as you have the event 'sink' side. I was looking at writing the 'source' side, and just havn't had the time to work out enumeration objects as of yet. But the client side should be lots simpler. (Hrmmmm... that might be a nice tut for me to do one day... let VB talk to ASM). Seeya
Posted on 2001-01-23 12:49:00 by Ernie
Thanx again for your help... I got (albeit, a mild version) of the same idea you expressed when i noticed the WITHEVENTS command. But I didnt make a point of getting to that becuase the doc's i read implied this is not necessarily needed for all uses (infact it was the only example with it..) I will let the topic rest for a bit till i get more rooted into the theory, and thanx for giving me clear guidelines on the code you would use (it will be an affirming help) :) NaN
Posted on 2001-01-23 21:47:00 by NaN