News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Am I right defining the GUID?

Started by Farabi, June 07, 2009, 03:39:59 AM

Previous topic - Next topic

UtillMasm

 :U
Assembling: SAPI.asm
SAPI.obj : error LNK2001: unresolved external symbol _VarI4FromI8@12
SAPI.obj : error LNK2001: unresolved external symbol _VarI4FromUI8@12
SAPI.exe : fatal error LNK1120: 2 unresolved externals
Press any key to continue . . .

ToutEnMasm


      includelib \masm32\lib\oleaut32.lib

It's two names of api that are reused in interfaces functions and masm don't accept this



ToutEnMasm


Not that,
There is something unsupported by masm in the name ??..!
just put in comment the prototypes ,adding just a ; (nothing else) here
Quote
F:\sdkrc7\OleAuto.sdk
308   : VarI4FromUI8 PROTO :QWORD ,:DWORD
684   : VarI4FromUI8 PROTO :QWORD ,:DWORD

UtillMasm

 :U Assembling: SAPI.asm
LINK : warning LNK4089: all references to "gdi32.dll" discarded by /OPT:REF
Press any key to continue . . .

ToutEnMasm


You are ready now to make a simple of use.
using interfaces couldn't be more simple
Sample:
You want to use ISpeechPhraseRule ,create a data for the interface pointer adding ppv to the name of the interface.That is ppvISpeechPhraseRule
Get the pointer on the interface , put it in ppvISpeechPhraseRule
You can now use the interface as an api ,the name of the interface replace invoke (who is in used in the macro)
sample
ISpeechPhraseRule Release

If you don't have it,download Oleview,it is very useful to find the interfaces supported by a CLSID(coclass)



UtillMasm


dedndave

Quoteusing interfaces couldn't be more simple
that's easy for you to say - lol

ToutEnMasm


I wasn't saying it is simple
If you find something more simple with the same grants of writing (use of prototypes and invoke), I get it.


Farabi

What is this used for? ISpRecoGrammar::LoadDictation and how do I make a topic for it?

Is this function STISpRecoGrammar.SetDictationState make my computer to start listening? How to get the word from it?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

ToutEnMasm


Farabi

Quote from: ToutEnMasm on June 10, 2009, 07:26:23 AM

Seems you need now a microphone and to study the samples.
For XP it's here
http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&displaylang=en

The microphone is attached to my laptop.
I already had all of the SDK, just need an example, but nevermind, I will debug the example.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

ToutEnMasm


In this case,the "SimpleDict" is written in c++ and seems to be not too more difficult.
I have try to compile it without success (too many errors of syntax)
But the exe work.
I will try to translate it.


Farabi

Quote from: ToutEnMasm on June 10, 2009, 12:14:15 PM

In this case,the "SimpleDict" is written in c++ and seems to be not too more difficult.
I have try to compile it without success (too many errors of syntax)
But the exe work.
I will try to translate it.



Talkback looks more simpler I guess.


I confused translating this, I think this is the last part

inline HRESULT BlockForResult(ISpRecoContext * pRecoCtxt, ISpRecoResult ** ppResult)
{
    HRESULT hr = S_OK;
CSpEvent event;

    while (SUCCEEDED(hr) &&
           SUCCEEDED(hr = event.GetFrom(pRecoCtxt)) &&
           hr == S_FALSE)
    {
        hr = pRecoCtxt->WaitForNotifyEvent(INFINITE);
    }

    *ppResult = event.RecoResult();
    if (*ppResult)
    {
        (*ppResult)->AddRef();
    }

    return hr;
}




WaitForNotifyEvent proc uses esi edi nDWMilliSecond:dword

push nDWMilliSecond
mov esi,rcc
push esi
mov esi,[esi]
call [esi].STISpRecoContext.WaitForNotifyEvent

ret
WaitForNotifyEvent endp

BlockForResult proc
LOCAL buff[256]:dword


push 0
lea eax,buff
push eax
push 1
mov eax,rcc
push eax
mov eax,[eax]
call[eax].STISpRecoContext.GetEvents

; invoke WaitForNotifyEvent,INFINITE
; .if eax==S_OK
; xchg edx,eax
; invoke dw2hex,edx,addr buff
; invoke MessageBox,0,addr buff,0,0
; .endif
;invoke MessageBox,hWnd,CADD("OKe done"),0,0

ret
BlockForResult endp


Here is a part of the event class

   IUnknown * Object() const
    {
        SPDBG_ASSERT(elParamType == SPET_LPARAM_IS_OBJECT);
        return (IUnknown*)lParam;
    }
    ISpRecoResult * RecoResult() const
    {
        SPDBG_ASSERT(eEventId == SPEI_RECOGNITION || eEventId == SPEI_FALSE_RECOGNITION || eEventId == SPEI_HYPOTHESIS);
        return (ISpRecoResult *)Object();
    }
   HRESULT GetFrom(ISpEventSource * pEventSrc)
    {
        SpClearEvent(this);
        return pEventSrc->GetEvents(1, this, NULL);
    }
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

ToutEnMasm


Ok , seems also it's the correct one to translate. I have play with it a little.
Same defauts as the other,could not be compile.


Farabi

Anyone know what is this mean?

SPDBG_ASSERT(eEventId == SPEI_RECOGNITION || eEventId == SPEI_FALSE_RECOGNITION || eEventId == SPEI_HYPOTHESIS);


I used

movzx eax, SPEI_RECOGNITION or SPEI_FALSE_RECOGNITION or SPEI_HYPOTHESIS


but the value is never match.
If I used the value 520 every time I talk to my computer the computer responded and show a message box.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"