Solved

undeclared identifier for "StatusCall" help - 1000 points

Posted on 2004-04-12
3
313 Views
Last Modified: 2010-04-05

    if Succeeded(NetSink.QueryInterface(IID_IWMRegisterCallback, StatusCall)) then
    begin
      StatusCall.Advise(self as IWMStatusCallback, nil)
    end;

in this area i get undeclared identifier for "StatusCall" need this sorted if possable? Where is it?

I need this sorted ASAP, will post second question with extra 500 points

Full post : http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20604292.html


//.....
  TfrmPreviewWindow = class(TForm, IWMStatusCallback)

//.....
  public // could be in private I imagine
        function OnStatus(Status: TWMTStatus; hr: HRESULT; dwType: TWMTAttrDataType; pValue: PBYTE; pvContext: Pointer): HRESULT; stdcall;

//.....after your renderstream
    if Succeeded(NetSink.QueryInterface(IID_IWMRegisterCallback, StatusCall)) then
    begin
      StatusCall.Advise(self as IWMStatusCallback, nil)
    end;
//.....
function TfrmPreviewWindow.OnStatus(Status: TWMTStatus; hr: HRESULT; dwType: TWMTAttrDataType; pValue: PBYTE; pvContext: Pointer): HRESULT;
begin
//just some sample code.
  if (Status in [WMT_CLIENT_CONNECT, WMT_CLIENT_DISCONNECT]) then
  begin
    case Status of
      WMT_CLIENT_CONNECT    : inc(iStreamViewers);
      WMT_CLIENT_DISCONNECT : dec(iStreamViewers);
    end;

    sbPreview.Panels.Items[1].Text := inttostr(iStreamViewers) + ' viewers';
  end;
end;
0
Comment
Question by:matrix69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
dlengel earned 500 total points
ID: 10828969
See here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform/htm/iwmregistercallbackadvise.asp
adn here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform/htm/iwmregistercallbackinterface.asp

StatusCall appears to be a reference to an IWMRegisterCallback interface.  It looks like you can find it with a property of whatever writer object you are using, and use the reference in the .Advise function call.

It is the only thing I found that fits the parameters being sent to it.  I am not sure what the rest of your code is or does, so I can't help find/create the StatusCall object.  Hopefully, this gets you started.

Daniel Engel
0
 
LVL 1

Author Comment

by:matrix69
ID: 10830392
dlengel,

Thank you for the links... I try to stay away from MS as much as I can lol...

Your links proved very helpfull....

After some searching and looking at some MS C code I was able to get it functioning...
My OnStatus function for the network sink is now active....


Thank you...

0
 
LVL 1

Author Comment

by:matrix69
ID: 10830409
dlengel,

please comment here an I will award you the extra points

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20954752.html
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question