Solved

undeclared identifier for "StatusCall" help - 1000 points

Posted on 2004-04-12
3
307 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now