Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

undeclared identifier for "StatusCall" help - 1000 points

Posted on 2004-04-12
3
Medium Priority
?
318 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

722 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