Solved

undeclared identifier for "StatusCall" help - 1000 points

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

18 Experts available now in Live!

Get 1:1 Help Now