Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

undeclared identifier for "StatusCall" help - 1000 points


    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
matrix69
Asked:
matrix69
  • 2
1 Solution
 
dlengelCommented:
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
 
matrix69Author Commented:
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
 
matrix69Author Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now